Search in sources :

Example 1 with SerializablePerson

use of com.alibaba.dubbo.common.model.SerializablePerson in project dubbo by alibaba.

the class AbstractSerializationTest method test_StringSPersonMap.

@Test
public void test_StringSPersonMap() throws Exception {
    Map<String, SerializablePerson> args = new HashMap<String, SerializablePerson>();
    args.put("1", new SerializablePerson());
    assertObject(args);
}
Also used : HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) SerializablePerson(com.alibaba.dubbo.common.model.SerializablePerson) Test(org.junit.Test)

Example 2 with SerializablePerson

use of com.alibaba.dubbo.common.model.SerializablePerson in project dubbo by alibaba.

the class AbstractSerializationTest method test_SPersonSet.

@Test
public void test_SPersonSet() throws Exception {
    Set<SerializablePerson> args = new HashSet<SerializablePerson>();
    args.add(new SerializablePerson());
    assertObject(args);
}
Also used : SerializablePerson(com.alibaba.dubbo.common.model.SerializablePerson) HashSet(java.util.HashSet) Test(org.junit.Test)

Example 3 with SerializablePerson

use of com.alibaba.dubbo.common.model.SerializablePerson in project dubbo by alibaba.

the class AbstractSerializationTest method test_IntSPersonMap.

@Test
public void test_IntSPersonMap() throws Exception {
    Map<Integer, SerializablePerson> args = new HashMap<Integer, SerializablePerson>();
    args.put(1, new SerializablePerson());
    assertObject(args);
}
Also used : BigInteger(java.math.BigInteger) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) SerializablePerson(com.alibaba.dubbo.common.model.SerializablePerson) Test(org.junit.Test)

Example 4 with SerializablePerson

use of com.alibaba.dubbo.common.model.SerializablePerson in project dubbo by alibaba.

the class AbstractSerializationTest method test_SPersonListList.

@Test
public void test_SPersonListList() throws Exception {
    List<List<SerializablePerson>> args = new ArrayList<List<SerializablePerson>>();
    List<SerializablePerson> sublist = new ArrayList<SerializablePerson>();
    sublist.add(new SerializablePerson());
    args.add(sublist);
    assertObject(args);
}
Also used : SerializablePerson(com.alibaba.dubbo.common.model.SerializablePerson) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Test(org.junit.Test)

Example 5 with SerializablePerson

use of com.alibaba.dubbo.common.model.SerializablePerson in project dubbo by alibaba.

the class PojoUtilsTest method test_pojo.

@Test
public void test_pojo() throws Exception {
    assertObject(new Person());
    assertObject(new SerializablePerson());
}
Also used : SerializablePerson(com.alibaba.dubbo.common.model.SerializablePerson) BigPerson(com.alibaba.dubbo.common.model.person.BigPerson) SerializablePerson(com.alibaba.dubbo.common.model.SerializablePerson) Person(com.alibaba.dubbo.common.model.Person) Test(org.junit.Test)

Aggregations

SerializablePerson (com.alibaba.dubbo.common.model.SerializablePerson)8 Test (org.junit.Test)8 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)4 LinkedHashMap (java.util.LinkedHashMap)4 List (java.util.List)3 Person (com.alibaba.dubbo.common.model.Person)2 BigPerson (com.alibaba.dubbo.common.model.person.BigPerson)2 BigInteger (java.math.BigInteger)1 HashSet (java.util.HashSet)1 LinkedList (java.util.LinkedList)1