review comments

This commit is contained in:
Ganesh Pagade 2019-03-10 11:24:33 +05:30
parent 213349420b
commit ef94015a36
1 changed files with 3 additions and 1 deletions

View File

@ -81,6 +81,7 @@ public class GsonAdvanceUnitTest {
assertEquals(2, outList.size());
assertTrue(outList.get(0) instanceof Dog);
assertTrue(outList.get(1) instanceof Cow);
}
@Test
@ -101,7 +102,7 @@ public class GsonAdvanceUnitTest {
Type listOfAnimals = new TypeToken<ArrayList<Animal>>() {}.getType();
RuntimeTypeAdapterFactory<Animal> adapter = RuntimeTypeAdapterFactory.of(Animal.class)
RuntimeTypeAdapterFactory<Animal> adapter = RuntimeTypeAdapterFactory.of(Animal.class, "type")
.registerSubtype(Dog.class)
.registerSubtype(Cow.class);
@ -111,5 +112,6 @@ public class GsonAdvanceUnitTest {
assertEquals(2, outList.size());
assertTrue(outList.get(0) instanceof Dog);
assertTrue(outList.get(1) instanceof Cow);
}
}