Methods Summary |
---|
protected void | expectAssertion(java.lang.String target)runs a test and expects an assertion thrown in forked code
expectBuildExceptionContaining(target,
"assertion not thrown in "+target,
"Java returned: 1");
|
protected void | setUp()
configureProject("src/etc/testcases/types/assertions.xml");
|
protected void | tearDown()
executeTarget("teardown");
|
public void | testClassname()
expectAssertion("test-classname");
|
public void | testDisable()
executeTarget("test-disable");
|
public void | testEmptyAssertions()
executeTarget("test-empty-assertions");
|
public void | testJunit()
executeTarget("test-junit");
|
public void | testMultipleAssertions()
expectBuildExceptionContaining("test-multiple-assertions",
"multiple assertions rejected",
"Only one assertion declaration is allowed");
|
public void | testNofork()
if (AssertionsTest.class.desiredAssertionStatus()) {
return; // ran Ant tests with -ea and this would fail spuriously
}
expectLogContaining("test-nofork",
"Assertion statements are currently ignored in non-forked mode");
|
public void | testOverride()
expectAssertion("test-override");
|
public void | testOverride2()
executeTarget("test-override2");
|
public void | testPackage()
expectAssertion("test-package");
|
public void | testReferenceAbuse()
expectBuildExceptionContaining("test-reference-abuse",
"reference abuse rejected",
"You must not specify");
|
public void | testReferences()
expectAssertion("test-references");
|