jan.rabe
01/22/2017, 10:50 AMinline fun <reified T> String.fromJson(): T = GsonProvider.getGson().fromJson(this)
interface SerializableTest<T> {
var expectedJson: String
@Test
fun serialize() {
val actual: T = expectedJson.fromJson()
Assert.assertNotNull(actual)
}
}
i was trying to just pass the generic type to the interface and have the reified inline method creating T