use of com.alibaba.dubbo.common.model.SerializablePerson in project dubbo by alibaba.
the class AbstractSerializationTest method test_StringSPersonListMap.
// ================ Complex Collection Type ================
@Test
public void test_StringSPersonListMap() throws Exception {
Map<String, List<SerializablePerson>> args = new HashMap<String, List<SerializablePerson>>();
List<SerializablePerson> sublist = new ArrayList<SerializablePerson>();
sublist.add(new SerializablePerson());
args.put("1", sublist);
assertObject(args);
}
use of com.alibaba.dubbo.common.model.SerializablePerson in project dubbo by alibaba.
the class AbstractSerializationTest method test_SPersonList.
@Test
public void test_SPersonList() throws Exception {
List<SerializablePerson> args = new ArrayList<SerializablePerson>();
args.add(new SerializablePerson());
assertObject(args);
}
use of com.alibaba.dubbo.common.model.SerializablePerson in project dubbo by alibaba.
the class PojoUtilsTest method test_Map_List_pojo.
@Test
public void test_Map_List_pojo() throws Exception {
Map<String, List<Object>> map = new HashMap<String, List<Object>>();
List<Object> list = new ArrayList<Object>();
list.add(new Person());
list.add(new SerializablePerson());
map.put("k", list);
Object generalize = PojoUtils.generalize(map);
Object realize = PojoUtils.realize(generalize, Map.class);
assertEquals(map, realize);
}
Aggregations