Documentation of Cherry Framework

Integrate Cherry with Cucumber (incl. Java8)

'Cherry with Cucumber? Are you sure M?', asked the Agent...

Fluent APIs enable readable code on the Step Definition level when used along with Cucumber or JBehave.

If you have started using cucumber-java8 you can use our cherry-cucumber module to create CherrySteps which will execute your functional missions.

You just need to implement the CherryOnTop interface and provide a functional agent for the execution of your missions.

Here's an example from our cherry-cucumber project:

 public class ExampleStepDefinitions implements CherryOnTop {

    private final FunctionalAgent systemSupportAgent = new FunctionalAgent(new CoreMemory());
    public static final SupportPersonMissions systemSupportPerson = new SupportPersonMissions();

   public ExampleStepDefinitions() {

      CherryStep("I remember something", systemSupportPerson.remembersSomething );
      CherryStep("I remember that (.+) is wrong", systemSupportPerson.remembersSomethingElse);
      CherryStep("I remember (.+) and (.+)", systemSupportPerson.rememberMultipleThings);

  }


  @Override
  public FunctionalAgent getFunctionalAgent() {
     return systemSupportAgent;
  }
}

These missions are functionalMissions like the following:

 (s1, s2, functionalAgent) -> {
    functionalAgent.performs(printingOf(String.join(",", s1, s2))); 
    return functionalAgent;
};