An active specification with JUnit 4 consists of two parts: an
HTML file and a Java test has the annotation @RunWith(ConcordionRunner.class)
.
When you run the test class using JUnit, it will automatically locate the HTML file. It does this by looking in the same package for a ".html" file named the same as the test, but without the "Test" or "Fixture" suffixes.
If your test is called com.example.BreadcrumbTest then the corresponding HTML file must be in the same package (com.example) and called Breadcrumb.html.
import org.concordion.integration.junit4.ConcordionRunner;
import org.junit.Before;
import org.junit.runner.RunWith;
@RunWith(ConcordionRunner.class)
public class jUnit4Test {
@Before
public void before() {
// this method is called before your fixture starts
}
public boolean assertSomething() {
// this method can be asserted to return "true" from your specification using the
// concordion:assertTrue command.
// other commands can be found here.
}
}