Fork me on GitHub

The WOUnit framework contains a set of utilities for testing WebObjects applications using JUnit 4.7 or later capabilities.

Features

Usage

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.

Dependencies

Install

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:
  1. Download the wounit.jar.
  2. Add the wounit library to the build path.

Download

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

License

WOUnit is free software released under the Apache 2 license.

Author

Henrique Prange (hprange at gmail.com)