Last active
May 21, 2019 13:32
-
-
Save beyondxscratch/99998bd437479f1bc1955a4c6ca2f497 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 StepDefs implements En { | |
public StepDefs() { | |
Given("^a cinephile$", () -> me = new Cinephile("me")); | |
Given("^the last showing is not started yet$", | |
() -> lastShowing = new Showing(now().plusHours(3))); | |
When("^the user asks for the next showings$", | |
() -> nextShowings = searchShowings.searchNextShowingsFor(me)); | |
Then("^the returned showings are not started yet$", () -> { | |
assertThat(allShowings.stream().filter(showing -> !showing.hasStarted())) | |
.containsAnyElementsOf(nextShowings); | |
}); | |
Then("^the returned showings are not starting in the next 15 minutes$", () -> { | |
assertThat(nextShowings) | |
.noneMatch( showing -> showing.startsBefore(now().plusMinutes(15))); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment