Search in sources :

Example 1 with ComponentModifier

use of org.whole.lang.models.model.ComponentModifier in project whole by wholeplatform.

the class ByChildAPITest method testAbstractSetCompositeEntity.

@Test
public void testAbstractSetCompositeEntity() {
    ModelsEntityFactory mf = ModelsEntityFactory.instance(RegistryConfigurations.STRICT);
    ComponentModifier o = mf.createComponentModifier(ComponentModifierEnum.ordered);
    ComponentModifier r = mf.createComponentModifier(ComponentModifierEnum.reference);
    ComponentModifier s = mf.createComponentModifier(ComponentModifierEnum.derived);
    ComponentModifier[] modifiersArray = new ComponentModifier[] { o, r, s };
    ComponentModifiers modifiers = mf.createComponentModifiers(modifiersArray);
    unorderedCompositeOperationsEntityTest(modifiersArray, modifiers);
    commonOperationsEntityTest(modifiersArray, modifiersArray, modifiers);
    uniqueOperationsEntityTest(modifiersArray, modifiers);
    propertyChangeEntityTest(modifiersArray, modifiers, mf.createComponentModifier(ComponentModifierEnum.unique));
}
Also used : ComponentModifiers(org.whole.lang.models.model.ComponentModifiers) ComponentModifier(org.whole.lang.models.model.ComponentModifier) ModelsEntityFactory(org.whole.lang.models.factories.ModelsEntityFactory) Test(org.junit.Test)

Example 2 with ComponentModifier

use of org.whole.lang.models.model.ComponentModifier in project whole by wholeplatform.

the class ByChildAPITest method testAbstractListEntity.

@Test
public void testAbstractListEntity() {
    ModelsEntityFactory mf = ModelsEntityFactory.instance;
    ComponentModifier o = mf.createComponentModifier(ComponentModifierEnum.ordered);
    ComponentModifier r1 = mf.createComponentModifier(ComponentModifierEnum.reference);
    ComponentModifier r2 = mf.createComponentModifier(ComponentModifierEnum.reference);
    ComponentModifier s = mf.createComponentModifier(ComponentModifierEnum.derived);
    ComponentModifier[] modifiersArray = new ComponentModifier[] { o, r1, r2, s };
    int[] businessEquivalence = new int[] { 0, 1, 1, 3 };
    ComponentModifiers modifiers = mf.createComponentModifiers(modifiersArray);
    orderedCompositeOperationsEntityTest(modifiersArray, businessEquivalence, modifiers);
    commonOperationsEntityTest(modifiersArray, modifiersArray, modifiers);
    propertyChangeEntityTest(modifiersArray, modifiers, mf.createComponentModifier(ComponentModifierEnum.reference));
}
Also used : ComponentModifiers(org.whole.lang.models.model.ComponentModifiers) ComponentModifier(org.whole.lang.models.model.ComponentModifier) ModelsEntityFactory(org.whole.lang.models.factories.ModelsEntityFactory) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 ModelsEntityFactory (org.whole.lang.models.factories.ModelsEntityFactory)2 ComponentModifier (org.whole.lang.models.model.ComponentModifier)2 ComponentModifiers (org.whole.lang.models.model.ComponentModifiers)2