Last active
May 29, 2017 11:01
-
-
Save milingo/9061765 to your computer and use it in GitHub Desktop.
Unit Tests in Java
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
# Run only failed test on cucumber | |
mvn test -Dcucumber.options="@target/cucumber-failed.txt" | |
# Run only a feature on cucumber | |
mvn clean test -Dcucumber.options="/path/to/feature:37" | |
or | |
mvn clean test -Dcucumber.options="--tags @NonGeoLocatedBid" |
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
// Make assertions over parameters of a method call on a unit test with mockito | |
ArgumentCaptor<EventData> model = ArgumentCaptor.forClass(EventData.class); | |
verify(adEventDAOMock).save(eq(request.getBid()), model.capture()); | |
assertFalse(model.getValue().getGeohash().isEmpty()); | |
assertFalse(model.getValue().getEvents().isEmpty()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment