Skip to content

Instantly share code, notes, and snippets.

@RiverGlide
Created February 11, 2016 10:48
Show Gist options
  • Save RiverGlide/389b8ee585de72b92987 to your computer and use it in GitHub Desktop.
Save RiverGlide/389b8ee585de72b92987 to your computer and use it in GitHub Desktop.
public class AddATodoItem implements Task {
private final String thingToDo;
public <T extends Actor> void performAs(T theActor) {
theActor.attemptsTo(
Enter.theValue(thingToDo)
.into(WHAT_NEEDS_TO_BE_DONE)
.thenHit(RETURN)
);
}
public static AddATodoItem called(String thingToDo) {
return instrumented(AddATodoItem.class, thingToDo);
}
public AddATodoItem(String thingToDo) { this.thingToDo = thingToDo; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment