|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--com.ashridgetech.prevdb.test.BaseTest
Common facilities for tests on the Prevdb classes.
Field Summary | |
protected BigDecimal |
balance
|
protected BigDecimal |
balance2
|
protected List |
checkTextIgnorePrefixes
|
protected int |
creditLimit
|
protected int |
creditLimit2
|
protected String |
desc
|
protected String |
desc2
|
static Integer |
ELEVEN
|
static Integer |
FOUR
|
protected org.apache.log4j.Logger |
log
|
protected String |
name
|
protected String |
name2
|
static Integer |
ONE
|
protected PrevDb |
prevDb
|
protected Date |
startDate
|
protected Date |
startDate2
|
protected TestSystemStore |
systemStore
|
static Integer |
TEN
|
static Integer |
THREE
|
static Integer |
TWO
|
Constructor Summary | |
BaseTest(String name)
Standard constructor required by subclasses of TestCase |
Method Summary | |
protected static void |
assertContains(Collection c,
Object o)
Test that c contains an object equal to o . |
protected static void |
assertContainsAsString(Collection c,
String s)
Test that c contains an object whose getDescription
method gives a value equal to s . |
protected static void |
assertContainsOnly(Collection c,
Object o)
Test that c contains an object equal to o
and nothing else. |
protected static void |
assertContainsOnly(Collection c,
Object o1,
Object o2)
Test that c contains objects equal to o1 and
o2 and nothing else. |
protected static void |
assertContainsOnly(Collection c,
Object o1,
Object o2,
Object o3)
Test that c contains objects equal to o1 ,
o2 and o3 and nothing else. |
protected static void |
assertContainsOnly(Collection c,
Object o1,
Object o2,
Object o3,
Object o4)
Test that c contains objects equal to o1 ,
o2 , o4 and o4 and nothing else. |
protected static void |
assertEmpty(Collection c)
Test that c is empty |
protected static void |
assertNotContainsAsString(Collection c,
String s)
Test that c does not contain an object whose toString
method gives a value equal to s . |
protected void |
checkEquals(String expected,
String actual)
Check two Strings for equality, and dump characters if they differ. |
protected void |
checkEquals(String message,
String expected,
String actual)
Check two Strings for equality, and dump characters if they differ. |
protected void |
checkText(String expected,
String actual)
Check the current text. |
protected void |
checkText(String expected,
String actual,
boolean dumpOnFail)
Check the current text. |
protected boolean |
checkTextIgnore(String expectedLine,
String actualLine)
|
protected PrevDb |
createPrevDb(SystemStore store)
|
void |
setUp()
|
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected org.apache.log4j.Logger log
public static final Integer ONE
public static final Integer TWO
public static final Integer THREE
public static final Integer FOUR
public static final Integer TEN
public static final Integer ELEVEN
protected final String name
protected final Date startDate
protected final int creditLimit
protected final BigDecimal balance
protected final String desc
protected final String name2
protected final Date startDate2
protected final int creditLimit2
protected final BigDecimal balance2
protected final String desc2
protected PrevDb prevDb
protected TestSystemStore systemStore
protected List checkTextIgnorePrefixes
Constructor Detail |
public BaseTest(String name)
TestCase
name
- nameMethod Detail |
public void setUp()
setUp
in class junit.framework.TestCase
protected PrevDb createPrevDb(SystemStore store)
protected static void assertEmpty(Collection c)
c
is empty
protected static void assertContains(Collection c, Object o)
c
contains an object equal to o
.
protected static void assertContainsOnly(Collection c, Object o)
c
contains an object equal to o
and nothing else.
protected static void assertContainsOnly(Collection c, Object o1, Object o2)
c
contains objects equal to o1
and
o2
and nothing else.
protected static void assertContainsOnly(Collection c, Object o1, Object o2, Object o3)
c
contains objects equal to o1
,
o2
and o3
and nothing else.
protected static void assertContainsOnly(Collection c, Object o1, Object o2, Object o3, Object o4)
c
contains objects equal to o1
,
o2
, o4
and o4
and nothing else.
protected static void assertContainsAsString(Collection c, String s)
c
contains an object whose getDescription
method gives a value equal to s
.
c
- the objects to checkprotected static void assertNotContainsAsString(Collection c, String s)
c
does not contain an object whose toString
method gives a value equal to s
.
protected void checkEquals(String message, String expected, String actual)
message
- the messageexpected
- the expected textactual
- the actual textprotected void checkEquals(String expected, String actual)
expected
- the expected textactual
- the actual textprotected void checkText(String expected, String actual)
expected
- the expected textprotected void checkText(String expected, String actual, boolean dumpOnFail)
expected
- the expected textdumpOnFail
- if true, print the actual text if it failsprotected boolean checkTextIgnore(String expectedLine, String actualLine)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |