Created
February 11, 2016 10:48
-
-
Save RiverGlide/389b8ee585de72b92987 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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