use of org.whole.lang.models.model.TypeRelations in project whole by wholeplatform.
the class FactoriesTest method testDynamicFactory.
@Test
public void testDynamicFactory() {
TypeRelations typeRelations = ModelsEntityFactory.instance.createTypeRelations();
IEntityFactory ef = GenericEntityFactory.instance(RegistryConfigurations.CUSTOM);
InterpreterOperation.interpret(new ModelsModel().create());
ILanguageKit lk = ReflectionFactory.getLanguageKit("http://lang.whole.org/Models");
EntityDescriptorEnum edEnum = lk.getEntityDescriptorEnum();
typeRelations.wAdd(ef.create(edEnum.valueOf("TypeAliasOf")));
// PrettyPrinterOperation.prettyPrint(typeRelations);
Assert.assertFalse(typeRelations.wIsAdapter());
ReflectionFactory.deploy(new ModelsLanguageDynamicTestDeployer());
IEntity e1 = ef.create(ModelsEntityDescriptorEnum.TypeRelations, ef.create(ModelsEntityDescriptorEnum.TypeAliasOf), ef.create(ModelsEntityDescriptorEnum.SubtypesOf).wGetAdaptee(false));
PrettyPrinterOperation.prettyPrint(e1);
Assert.assertTrue(e1.wIsAdapter());
}
Aggregations