This commit is contained in:
Eric Cochran
2017-01-17 18:08:18 -08:00
parent a16323db02
commit fb3e9e8b47

View File

@@ -546,13 +546,13 @@ public final class MoshiTest {
Class<? extends Annotation> annotation = Annotation.class;
Moshi.Builder builder = new Moshi.Builder();
try {
builder.add((JsonAdapter.Factory) null);
builder.add((null));
fail();
} catch (IllegalArgumentException expected) {
assertThat(expected).hasMessage("factory == null");
}
try {
builder.add(null);
builder.add((Object) null);
fail();
} catch (IllegalArgumentException expected) {
assertThat(expected).hasMessage("adapter == null");