Examples of mapAsList()


Examples of ma.glasnost.orika.MapperFacade.mapAsList()

        collectionA.add(source);

        /*
         * Map the collection of A into a collection of B1 using 'mapAsList'
         */
        Collection<B1> collectionB1 = mapper.mapAsList(collectionA, B1.class);
       
        Assert.assertNotNull(collectionB1);
        B1 b1 = collectionB1.iterator().next();
        Assert.assertEquals(source.p1, b1.p1);
        Assert.assertEquals(source.p2, b1.p2);
View Full Code Here

Examples of ma.glasnost.orika.MapperFacade.mapAsList()

        Assert.assertEquals(source.a1.Pa12, b1.Pb12);
       
        /*
         * Map the collection of A into a collection of B2 using 'mapAsList'
         */
        Collection<B2> collectionB2 = mapper.mapAsList(collectionA, B2.class);
       
        B2 b2 = collectionB2.iterator().next();
        Assert.assertNotNull(b2);
        Assert.assertEquals(source.p1, b2.p1);
        Assert.assertEquals(source.p2, b2.p2);
View Full Code Here

Examples of ma.glasnost.orika.MapperFacade.mapAsList()

                .field("rank", "value")
                .byDefault().toClassMap());
               
        MapperFacade mapper = factory.getMapperFacade();
       
        List<Ranking> result = mapper.mapAsList(source, mapType, rankingType);
       
        Assert.assertNotNull(result);
       
        for (Ranking ranking: result) {
            Assert.assertTrue(source.get(ranking.getName()).equals(ranking.getRank()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.