0

If i tried to run a givwenzen script using FitNesse SLIM getting error that givwenzen class is not picked up. May be some class path error.

If anyone could help me with an example of givwenzen Even with the addition of two numbers.

Thanks in advance

jasbir malik
  • 11
  • 1
  • 5

1 Answers1

0

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;
  }

}
Mike Stockdale
  • 5,256
  • 3
  • 29
  • 33