assertEqualAutoCase
public void assertEqualAutoCase(String context,
String assertID,
Collection expected,
Collection actual)
Asserts that each entry in actual is matched with an entry in expected
that only differs by case. Order is not significant.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEquals
public void assertEquals(String assertID,
Collection expected,
Collection actual)
Asserts that each entry in actual exactly matches with an entry in
expected. Order is not significant.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEquals
public void assertEquals(String assertID,
Collection expected,
NodeList actual)
Asserts that each entry in actual exactly matches with an entry in
expected. Order is not significant.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEquals
public void assertEquals(String assertID,
String expected,
String actual)
Asserts that expected.equals(actual) is true
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEquals
public void assertEquals(String assertID,
boolean expected,
boolean actual)
Asserts that values of expected and actual are equal.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEquals
public void assertEquals(String assertID,
double expected,
double actual)
Asserts that values of expected and actual are equal.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEquals
public void assertEquals(String assertID,
int expected,
int actual)
Asserts that values of expected and actual are equal.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEqualsAutoCase
public void assertEqualsAutoCase(String context,
String assertID,
List expected,
List actual)
Asserts that each entry in actual is matched with an entry in expected
that only differs by case. Order is significant.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEqualsAutoCase
public void assertEqualsAutoCase(String context,
String assertID,
String expected,
String actual)
Asserts that expected.equalsIgnoreCase(actual) is true
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEqualsIgnoreCase
public void assertEqualsIgnoreCase(String assertID,
Collection expected,
Collection actual)
Asserts that each entry in actual is matched with an entry in expected
that only differs by case. Order is not significant.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEqualsIgnoreCase
public void assertEqualsIgnoreCase(String assertID,
List expected,
List actual)
Asserts that each entry in actual is matched with an entry in expected
that only differs by case. Order is significant.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertEqualsIgnoreCase
public void assertEqualsIgnoreCase(String assertID,
String expected,
String actual)
Asserts that expected.equalsIgnoreCase(actual) is true
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertFalse
public void assertFalse(String assertID,
Object actual)
Asserts that actual==false
assertID
- identifier of assertionactual
- actual value
assertFalse
public void assertFalse(String assertID,
boolean actual)
Asserts that actual==false
assertID
- identifier of assertionactual
- actual value
assertInstanceOf
public void assertInstanceOf(String assertID,
Class cls,
Object obj)
Asserts that obj is an instance of cls
assertID
- identifier of assertioncls
- class, may not be null.obj
- object
assertNotEquals
public void assertNotEquals(String assertID,
String expected,
String actual)
Asserts that values of expected and actual are not equal.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertNotEquals
public void assertNotEquals(String assertID,
double expected,
double actual)
Asserts that values of expected and actual are not equal.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertNotEquals
public void assertNotEquals(String assertID,
int expected,
int actual)
Asserts that values of expected and actual are not equal.
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertNotEqualsAutoCase
public void assertNotEqualsAutoCase(String context,
String assertID,
String expected,
String actual)
Asserts that expected.equalsIgnoreCase(actual) is false
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertNotEqualsIgnoreCase
public void assertNotEqualsIgnoreCase(String assertID,
String expected,
String actual)
Asserts that expected.equalsIgnoreCase(actual) is false
assertID
- identifier of assertionexpected
- Expected value, may not be null.actual
- actual value
assertNotNull
public void assertNotNull(String assertID,
Object actual)
Asserts that actual != null
assertID
- identifier of assertionactual
- actual value
assertNull
public void assertNull(String assertID,
Object actual)
Asserts that actual == null
assertID
- identifier of assertionactual
- actual value
assertSame
public void assertSame(String assertID,
Object expected,
Object actual)
Asserts that actual and expected are the same object
assertID
- identifier of assertionactual
- actual value
assertSize
public void assertSize(String assertID,
int expectedSize,
Collection collection)
Asserts that the length of the collection is the expected size.
assertID
- identifier of assertionexpectedSize
- expected sizecollection
- collection
assertSize
public void assertSize(String assertID,
int expectedSize,
NamedNodeMap collection)
Asserts that the length of the collection is the expected size.
assertID
- identifier of assertionexpectedSize
- expected sizecollection
- collection
assertSize
public void assertSize(String assertID,
int expectedSize,
NodeList collection)
Asserts that the length of the collection is the expected size.
assertID
- identifier of assertionexpectedSize
- expected sizecollection
- collection
assertTrue
public void assertTrue(String assertID,
Object actual)
Asserts that actual==true
assertID
- identifier of assertionactual
- actual value
assertTrue
public void assertTrue(String assertID,
boolean actual)
Asserts that actual==true
assertID
- identifier of assertionactual
- actual value
assertURIEquals
public void assertURIEquals(String assertID,
String scheme,
String path,
String host,
String file,
String name,
String query,
String fragment,
Boolean isAbsolute,
String actual)
Asserts aspects of a URI
assertID
- identifier of assertionscheme
- Expected scheme, for example, "file". If null, scheme is
ignored.path
- Expected path, for example, "/DOM/Test". If null, path is
ignored.host
- Expected host, for example, "www.w3.org". If null, host is
ignored.file
- Expected file, for example, "staff.xml". If null, file is
ignored.name
- Expected name, for example, "staff". If null, name is
ignored.isAbsolute
- if Boolean.TRUE, URI must be absolute. Null indicates no
assertion.actual
- URI to be tested.
doMain
public static void doMain(Class testClass,
String[] args)
This method is called by the main() for each test and locates the
appropriate test framework and runs the specified test
testClass
- test classargs
- arguments to test class
equals
public boolean equals(Collection expected,
Collection actual)
Compares the values in actual and expected ignoring order.
expected
- expectedactual
- actual
- true if actual and expected are equal.
equals
public boolean equals(List expected,
List actual)
Compares the values in actual and expected.
expected
- expectedactual
- actual
- true if actual and expected are equal.
equals
public boolean equals(String expected,
String actual)
Compares the values of actual and expected.
expected
- expectedactual
- actual
- true if actual and expected are equal.
equals
public boolean equals(double expected,
double actual)
Compares the values of actual and expected.
expected
- expectedactual
- actual
- true if actual and expected are equal.
equals
public boolean equals(int expected,
int actual)
Compares the values of actual and expected.
expected
- expectedactual
- actual
- true if actual and expected are equal.
equalsAutoCase
public boolean equalsAutoCase(String context,
Collection expected,
Collection actual)
Compares the values in actual and expected ignoring case and order.
expected
- expectedactual
- actual
- true if actual and expected are equal ignoring case.
equalsAutoCase
public boolean equalsAutoCase(String context,
List expected,
List actual)
Compares the values in actual and expected ignoring case.
expected
- expectedactual
- actual
- true if actual and expected are equal ignoring case.
equalsAutoCase
public boolean equalsAutoCase(String context,
String expected,
String actual)
Compares the value of actual and expected ignoring case.
expected
- expectedactual
- actual
- true if actual and expected are equal ignoring case.
equalsIgnoreCase
public boolean equalsIgnoreCase(Collection expected,
Collection actual)
Compares the values in actual and expected ignoring case and order.
expected
- expectedactual
- actual
- true if actual and expected are equal ignoring case.
equalsIgnoreCase
public boolean equalsIgnoreCase(List expected,
List actual)
Compares the values in actual and expected ignoring case.
expected
- expectedactual
- actual
- true if actual and expected are equal ignoring case.
equalsIgnoreCase
public boolean equalsIgnoreCase(String expected,
String actual)
Compares the value of actual and expected ignoring case.
expected
- expectedactual
- actual
- true if actual and expected are equal ignoring case.
fail
public void fail(String assertID)
Fail test
assertID
- identifier of assertion
runTest
public abstract void runTest()
throws Throwable
Body of test
same
public boolean same(Object expected,
Object actual)
Compares the identity of actual and expected.
expected
- expectedactual
- actual
- true if actual and expected are the same object.
setFramework
public void setFramework(DOMTestFramework framework)
Sets test framework to be used by test.
size
public int size(Collection collection)
Gets the size of the collection
collection
- collection, may not be null.
size
public int size(NamedNodeMap collection)
Gets the size of the collection
collection
- collection, may not be null.
size
public int size(NodeList collection)
Gets the size of the collection
collection
- collection, may not be null.
wait
public void wait(int millisecond)
Wait
millisecond
- milliseconds to wait