mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Make "no adapter" error message friendlier.
In the very common case, there are no JsonQualifier annotations for the type.
This commit is contained in:
@@ -438,7 +438,7 @@ class KotlinJsonAdapterTest {
|
||||
moshi.adapter(Triple::class.java)
|
||||
fail()
|
||||
} catch (e: IllegalArgumentException) {
|
||||
assertThat(e).hasMessage("Platform class kotlin.Triple annotated [] "
|
||||
assertThat(e).hasMessage("Platform class kotlin.Triple (with no annotations) "
|
||||
+ "requires explicit JsonAdapter to be registered")
|
||||
}
|
||||
}
|
||||
@@ -609,7 +609,7 @@ class KotlinJsonAdapterTest {
|
||||
fail()
|
||||
} catch (e: IllegalArgumentException) {
|
||||
assertThat(e).hasMessage("No JsonAdapter for interface " +
|
||||
"com.squareup.moshi.kotlin.KotlinJsonAdapterTest\$Interface annotated []")
|
||||
"com.squareup.moshi.kotlin.KotlinJsonAdapterTest\$Interface (with no annotations)")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user