
import static com.wounit.matchers.EOAssert.*;
import com.wounit.rules.MockEditingContext;
import com.wounit.annotations.UnderTest;
public class FooTest {
@Rule
public MockEditingContext ec = new MockEditingContext("MyModel");
@UnderTest
private Foo foo;
@Test
public void cantSaveFooWithNullProperty() {
foo.setProperty(null);
confirm(foo, cannotBeSavedBecause("Foo must have a property"));
}
}
See the Complete Guide for more details about the WOUnit usage.
The Javadoc API documents are available online.
Maven users have to add the dependency declaration:
<dependency> <groupId>com.wounit</groupId> <artifactId>wounit</artifactId> <version>1.5</version> </dependency>Non Maven users have to:
You can download this project in either zip or jar formats.
You can also clone the project with Git by running:
$ git clone git://github.com/hprange/wounit
WOUnit is free software released under the Apache 2 license.
Henrique Prange (hprange at gmail.com)