Merge pull request #668 from square/bquenaudon/2018-09-13/fix-jsonadapter-test

Fix JsonQualifiers test
This commit is contained in:
Benoît Quenaudon
2018-09-14 09:00:13 -04:00
committed by GitHub

View File

@@ -339,8 +339,8 @@ public final class JsonQualifiersTest {
assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class);
assertThat(expected.getCause()).hasMessage("No @FromJson adapter for class java.lang.String " assertThat(expected.getCause()).hasMessage("No @FromJson adapter for class java.lang.String "
+ "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); + "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]");
assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); assertThat(expected.getCause()).hasCauseExactlyInstanceOf(IllegalArgumentException.class);
assertThat(expected.getCause()).hasMessage("No next JsonAdapter for class " assertThat(expected.getCause().getCause()).hasMessage("No next JsonAdapter for class "
+ "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); + "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]");
} }
} }
@@ -368,8 +368,8 @@ public final class JsonQualifiersTest {
assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class);
assertThat(expected.getCause()).hasMessage("No @ToJson adapter for class java.lang.String " assertThat(expected.getCause()).hasMessage("No @ToJson adapter for class java.lang.String "
+ "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); + "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]");
assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); assertThat(expected.getCause()).hasCauseExactlyInstanceOf(IllegalArgumentException.class);
assertThat(expected.getCause()).hasMessage("No next JsonAdapter for class " assertThat(expected.getCause().getCause()).hasMessage("No next JsonAdapter for class "
+ "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); + "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]");
} }
} }