From df730cafb9a58a51130eddc65064cfab9d110ecf Mon Sep 17 00:00:00 2001 From: Benoit Quenaudon Date: Thu, 13 Sep 2018 15:02:06 -0400 Subject: [PATCH] Fix JsonQualifiers test --- .../test/java/com/squareup/moshi/JsonQualifiersTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/moshi/src/test/java/com/squareup/moshi/JsonQualifiersTest.java b/moshi/src/test/java/com/squareup/moshi/JsonQualifiersTest.java index 0c46e3a..2493328 100644 --- a/moshi/src/test/java/com/squareup/moshi/JsonQualifiersTest.java +++ b/moshi/src/test/java/com/squareup/moshi/JsonQualifiersTest.java @@ -339,8 +339,8 @@ public final class JsonQualifiersTest { assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); assertThat(expected.getCause()).hasMessage("No @FromJson adapter for class java.lang.String " + "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); - assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); - assertThat(expected.getCause()).hasMessage("No next JsonAdapter for class " + assertThat(expected.getCause()).hasCauseExactlyInstanceOf(IllegalArgumentException.class); + assertThat(expected.getCause().getCause()).hasMessage("No next JsonAdapter for class " + "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); } } @@ -368,8 +368,8 @@ public final class JsonQualifiersTest { assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); assertThat(expected.getCause()).hasMessage("No @ToJson adapter for class java.lang.String " + "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); - assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); - assertThat(expected.getCause()).hasMessage("No next JsonAdapter for class " + assertThat(expected.getCause()).hasCauseExactlyInstanceOf(IllegalArgumentException.class); + assertThat(expected.getCause().getCause()).hasMessage("No next JsonAdapter for class " + "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); } }