use of jodd.util.testdata.B in project jodd by oblac.
the class ClassConverterTest method testCast.
@Test
public void testCast() {
String s = "123";
Integer d = TypeConverterManager.convertType(s, Integer.class);
assertEquals(123, d.intValue());
s = TypeConverterManager.convertType(d, String.class);
assertEquals("123", s);
MutableInteger md = TypeConverterManager.convertType(s, MutableInteger.class);
assertEquals(123, md.intValue());
B b = new B();
A a = TypeConverterManager.convertType(b, A.class);
assertEquals(a, b);
}
Aggregations