The project https://github.com/weswilliams/GivWenZen has a number of examples. Here's one:
1) Start with an example fixture actual class found in the givwenzen_test.jar.
2) In a FitNesse table it could look like this.
import and start should go in SetUp or SuiteSetUp
|import|
|org.givwenzen|
|script|
|start|giv wen zen for slim|
this is your test
|script|
| given| a ToDo item is due tomorrow |
| when | the date changes to tomorrow |
| then | a notification exists indicating the ToDo is due |
3) The following is an example step class and test step method ===
package bdd.steps;
@DomainSteps
public class ExampleSteps {
@DomainStep( “a ToDo item is due (.*)” )
public void createToDoWithDueDateOf(CustomDate date) {
// do something
}
@DomainStep( “the date changes to (.*)” )
public void theDateIs(CustomDate date) {
// do something
}
@DomainStep( “a notification exists indicating the ToDo is due” )
public boolean verifyNotificationExistsForDueToDo() {
// do something
return false;
}
}