use of org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl in project ovirt-engine by oVirt.
the class MappingLocatorTest method testStaticTemplatedBarToFooClassMapper.
@Test
public void testStaticTemplatedBarToFooClassMapper() {
Mapper<BarImpl, FooImpl> mapper = mappingLocator.getMapper(BarImpl.class, FooImpl.class);
assertNotNull(mapper);
FooImpl foo = mapper.map(new BarImpl("bar"), new FooImpl("overwrite", "keep"));
assertEquals("bar", foo.get());
assertEquals("keep", foo.other());
}
use of org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl in project ovirt-engine by oVirt.
the class MappingLocatorTest method testStaticFooToBarClassMapper.
@Test
public void testStaticFooToBarClassMapper() {
Mapper<FooImpl, BarImpl> mapper = mappingLocator.getMapper(FooImpl.class, BarImpl.class);
assertNotNull(mapper);
IBar bar = mapper.map(new FooImpl("foo"), null);
assertEquals("foo", bar.get());
}
Aggregations