use of org.whole.lang.testentities.model.ShortTestEntity in project whole by wholeplatform.
the class FactoriesTest method testDataFactoryMethodsWithPromotions.
@Test
public void testDataFactoryMethodsWithPromotions() {
TestEntitiesEntityFactory ef = TestEntitiesEntityFactory.instance;
ByteTestEntity be1 = ef.createByteTestEntity((byte) 23);
Assert.assertEquals((byte) 23, be1.wByteValue());
ByteTestEntity be2 = ef.create(TestEntitiesEntityDescriptorEnum.ByteTestEntity, (byte) 23);
Assert.assertEquals((byte) 23, be2.wByteValue());
CharTestEntity ce1 = ef.createCharTestEntity('c');
Assert.assertEquals('c', ce1.wCharValue());
CharTestEntity ce2 = ef.create(TestEntitiesEntityDescriptorEnum.CharTestEntity, 'c');
Assert.assertEquals('c', ce2.wCharValue());
CharTestEntity ce3 = ef.create(TestEntitiesEntityDescriptorEnum.CharTestEntity, (char) 65);
Assert.assertEquals(65, ce3.wCharValue());
ShortTestEntity se1 = ef.createShortTestEntity((short) 12345);
Assert.assertEquals((short) 12345, se1.wShortValue());
ShortTestEntity se2 = ef.create(TestEntitiesEntityDescriptorEnum.ShortTestEntity, (short) 12345);
Assert.assertEquals((short) 12345, se2.wShortValue());
}
Aggregations