Created
July 7, 2015 15:27
-
-
Save cupakromer/4ba0c4bc7e0a57c93b2c to your computer and use it in GitHub Desktop.
Sample JUnit
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 String railways(String name, Void _ignoreError) { | |
return "SUCCESS"; | |
} | |
public String railways(Void _ignoreName, String error) { | |
return "FAILURE"; | |
} | |
@Test | |
public void workingWithEither() { | |
assertThat(railways("Any Name", null), is(equalTo("SUCCESS"))); | |
assertThat(railways(null, "Any Error"), is(equalTo("FAILURE"))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment