incorporated review comments from r768

This commit is contained in:
Inderjeet Singh 2011-04-04 21:27:37 +00:00
parent 21ddfc9b12
commit 1a9a54dcc2

View File

@ -157,7 +157,6 @@ public class MapTest extends TestCase {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void testParameterizedMapSubclassDeserialization() { public void testParameterizedMapSubclassDeserialization() {
Type type = new TypeToken<MyParameterizedMap<String, Integer>>() {}.getType(); Type type = new TypeToken<MyParameterizedMap<String, Integer>>() {}.getType();
Gson gson = new Gson();
String json = "{\"a\":1,\"b\":2}"; String json = "{\"a\":1,\"b\":2}";
MyParameterizedMap<String, Integer> map = gson.fromJson(json, type); MyParameterizedMap<String, Integer> map = gson.fromJson(json, type);
assertEquals(1, map.get("a").intValue()); assertEquals(1, map.get("a").intValue());