Interface
caplin.testing

Fixture

Fixture is the interface for individual fixtures added to the GWTTestRunner. The purpose of a Fixture is to enable tests to manipulate and access a specific area of the system under tests using the GWT (given-when-then) BDD format.

Constructor Summary

Attributes Name and Description
caplin.testing.Fixture()

Method Summary

Attributes Name and Description
void addSubFixtures(caplin.testing.FixtureRegistry oFixtureRegistry)

This optional interface method can be implemented by a Fixture for a complex system which can be conceptually decomposed into separate sub-systems, enabling the fixture to delegate the handling of some fixture properties to the sub-fixtures.

Boolean canHandleProperty(String sProperty)

This method is called by the GWTTestRunner to check whether a property used in a GWT test is supported by the fixture.

void doGiven(String sPropertyName, String vValue)

This method is called in order to manipulate a property on the system under test in a given clause.

void doThen(String sPropertyName, String vValue)

This method is called in order to assert a property's value on the system under test.

void doWhen(String sPropertyName, String vValue)

This method is called in order to manipulate a property on the system under test in a when clause.

void setUp()

This method is called just before a GWT test.

void tearDown()

See caplin.testing.Fixture#tearDown

Constructor Detail

caplin.testing.Fixture()

Method Detail

void addSubFixtures(caplin.testing.FixtureRegistry oFixtureRegistry)

This optional interface method can be implemented by a Fixture for a complex system which can be conceptually decomposed into separate sub-systems, enabling the fixture to delegate the handling of some fixture properties to the sub-fixtures. This method is called by the GWTTestRunner.

Parameters
caplin.testing.FixtureRegistry oFixtureRegistry The registry to which the fixtures should be registered.

Boolean canHandleProperty(String sProperty)

This method is called by the GWTTestRunner to check whether a property used in a GWT test is supported by the fixture.

Parameters
String sProperty the property name to check.
Returns
{Boolean} true if the fixture handles the property; false otherwise

void doGiven(String sPropertyName, String vValue)

This method is called in order to manipulate a property on the system under test in a given clause.

Parameters
String sPropertyName The property to be changed.
String vValue The new value of the property.

void doThen(String sPropertyName, String vValue)

This method is called in order to assert a property's value on the system under test.

Parameters
String sPropertyName The property name to assert.
String vValue The value to assert.

void doWhen(String sPropertyName, String vValue)

This method is called in order to manipulate a property on the system under test in a when clause.

Parameters
String sPropertyName The property to be changed.
String vValue The new value of the property.

void setUp()

This method is called just before a GWT test. This optional interface method can be implemented if the fixture is required to correctly set up the system-under-test before each test.

void tearDown()

See caplin.testing.Fixture#tearDown