Result.Err.equals(): test when error is different
This commit is contained in:
parent
3e80dded1d
commit
1e85a14165
1 changed files with 1 additions and 0 deletions
|
@ -15,6 +15,7 @@ public class ResultTest implements WithAssertions {
|
||||||
final RuntimeException runtimeException = new RuntimeException();
|
final RuntimeException runtimeException = new RuntimeException();
|
||||||
assertThat(Result.ok(1)).isNotEqualTo(Result.error(runtimeException));
|
assertThat(Result.ok(1)).isNotEqualTo(Result.error(runtimeException));
|
||||||
assertThat(Result.error(runtimeException)).isEqualTo(Result.error(runtimeException));
|
assertThat(Result.error(runtimeException)).isEqualTo(Result.error(runtimeException));
|
||||||
|
assertThat(Result.error(runtimeException)).isNotEqualTo(Result.error(new RuntimeException()));
|
||||||
assertThat(Result.ok(1).equals("1")).isFalse();
|
assertThat(Result.ok(1).equals("1")).isFalse();
|
||||||
assertThat(Result.error(new RuntimeException()).equals("1")).isFalse();
|
assertThat(Result.error(new RuntimeException()).equals("1")).isFalse();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue