From 1e85a14165f2fce42a6192e7e4cfc9020df413ac Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 26 Jun 2018 22:18:32 +0100 Subject: [PATCH] Result.Err.equals(): test when error is different --- src/test/java/net/kemitix/mon/ResultTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/net/kemitix/mon/ResultTest.java b/src/test/java/net/kemitix/mon/ResultTest.java index 1386251..2a2f35e 100644 --- a/src/test/java/net/kemitix/mon/ResultTest.java +++ b/src/test/java/net/kemitix/mon/ResultTest.java @@ -15,6 +15,7 @@ public class ResultTest implements WithAssertions { final RuntimeException runtimeException = new RuntimeException(); assertThat(Result.ok(1)).isNotEqualTo(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.error(new RuntimeException()).equals("1")).isFalse(); }