Skip to content

Instantly share code, notes, and snippets.

@cupakromer
Created July 7, 2015 15:27
Show Gist options
  • Save cupakromer/4ba0c4bc7e0a57c93b2c to your computer and use it in GitHub Desktop.
Save cupakromer/4ba0c4bc7e0a57c93b2c to your computer and use it in GitHub Desktop.
Sample JUnit
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