本文整理汇总了Java中com.alibaba.dubbo.common.model.Person类的典型用法代码示例。如果您正苦于以下问题:Java Person类的具体用法?Java Person怎么用?Java Person使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Person类属于com.alibaba.dubbo.common.model包,在下文中一共展示了Person类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test_PersonList
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_PersonList() throws Exception {
List<Person> args = new ArrayList<Person>();
args.add(new Person());
assertObject(args);
}
示例2: test_PersonSet
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_PersonSet() throws Exception {
Set<Person> args = new HashSet<Person>();
args.add(new Person());
assertObject(args);
}
示例3: test_IntPersonMap
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_IntPersonMap() throws Exception {
Map<Integer, Person> args = new HashMap<Integer, Person>();
args.put(1, new Person());
assertObject(args);
}
示例4: test_StringPersonMap
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_StringPersonMap() throws Exception {
Map<String, Person> args = new HashMap<String, Person>();
args.put("1", new Person());
assertObject(args);
}
示例5: test_StringPersonListMap
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_StringPersonListMap() throws Exception {
Map<String, List<Person>> args = new HashMap<String, List<Person>>();
List<Person> sublist = new ArrayList<Person>();
sublist.add(new Person());
args.put("1", sublist);
assertObject(args);
}
示例6: test_PersonListList
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_PersonListList() throws Exception {
List<List<Person>> args = new ArrayList<List<Person>>();
List<Person> sublist = new ArrayList<Person>();
sublist.add(new Person());
args.add(sublist);
assertObject(args);
}
示例7: test_Map_List_pojo
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@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);
}
示例8: test_PojoArray
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_PojoArray() throws Exception {
Person[] array = new Person[2];
array[0] = new Person();
{
Person person = new Person();
person.setName("xxxx");
array[1] = person;
}
assertArrayObject(array);
}
示例9: test_simpleCollection
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_simpleCollection() throws Exception {
Type gtype = getType("returnListPersonMethod");
List<Person> list = new ArrayList<Person>();
list.add(new Person());
{
Person person = new Person();
person.setName("xxxx");
list.add(person);
}
assertObject(list,gtype);
}
示例10: testRealizeLinkedList
import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void testRealizeLinkedList() throws Exception {
LinkedList<Person> input = new LinkedList<Person>();
Person person = new Person();
person.setAge(37);
input.add(person);
Object obj = PojoUtils.generalize(input);
Assert.assertTrue(obj instanceof List);
Assert.assertTrue(input.get(0) instanceof Person);
Object output = PojoUtils.realize(obj, LinkedList.class);
Assert.assertTrue(output instanceof LinkedList);
}