Examples of ChildClassWithPrimitives


Examples of de.zalando.typemapper.namedresult.results.ChildClassWithPrimitives

            Assert.assertNotNull(result.getArray());
            Assert.assertTrue(result.getArray().size() == 2);
            Assert.assertNotNull(result.getArray().get(0));
            Assert.assertNotNull(result.getArray().get(1));

            ChildClassWithPrimitives classWithPrimitives = result.getArray().get(0);
            Assert.assertEquals(1, classWithPrimitives.getI());
            Assert.assertEquals(2, classWithPrimitives.getL());
            Assert.assertEquals('c', classWithPrimitives.getC());
            classWithPrimitives = result.getArray().get(1);
            Assert.assertEquals(1, classWithPrimitives.getI());
            Assert.assertEquals(2, classWithPrimitives.getL());
            Assert.assertEquals('c', classWithPrimitives.getC());

        }
    }
View Full Code Here

Examples of de.zalando.typemapper.namedresult.results.ChildClassWithPrimitives

        final PreparedStatement ps = connection.prepareStatement("SELECT 1 as i, 2 as l, 'c' as c");
        final ResultSet rs = ps.executeQuery();
        final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ChildClassWithPrimitives.class);
        int i = 0;
        while (rs.next()) {
            final ChildClassWithPrimitives result = (ChildClassWithPrimitives) mapper.mapRow(rs, i++);
            Assert.assertNotNull(result);
            Assert.assertEquals(1, result.getI());
            Assert.assertEquals(2, result.getL());
            Assert.assertEquals('c', result.getC());
        }
    }
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.