Search in sources :

Example 11 with AssociationSimpleDefinition

use of io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition in project vertigo by KleeGroup.

the class EAXmiTestParser method testAssoctationSimpleAnB1v.

/**
 * Test d'une relation An - B1v.
 */
@Test
public void testAssoctationSimpleAnB1v() {
    final AssociationSimpleDefinition association = getAssociationSimpleDefinition("A_CHA_CHI_4");
    /* "0..*" */
    Assert.assertTrue(association.getAssociationNodeA().isMultiple());
    Assert.assertFalse(association.getAssociationNodeA().isNotNull());
    /* "0..1" */
    Assert.assertFalse(association.getAssociationNodeB().isMultiple());
    Assert.assertFalse(association.getAssociationNodeB().isNotNull());
    Assert.assertEquals("R4A", association.getAssociationNodeA().getRole());
    Assert.assertEquals("R4B", association.getAssociationNodeB().getRole());
    Assert.assertFalse(association.getAssociationNodeA().isNavigable());
    Assert.assertTrue(association.getAssociationNodeB().isNavigable());
}
Also used : AssociationSimpleDefinition(io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition) Test(org.junit.Test)

Example 12 with AssociationSimpleDefinition

use of io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition in project vertigo by KleeGroup.

the class EAXmiTestParser method testAssoctationA1Bnv.

/**
 * Test d'une relation A1 - Bnv.
 */
@Test
public void testAssoctationA1Bnv() {
    final AssociationSimpleDefinition association = getAssociationSimpleDefinition("A_CHA_CHI_1");
    Assert.assertNotNull(association);
    /* "0..1" */
    Assert.assertFalse(association.getAssociationNodeA().isMultiple());
    Assert.assertFalse(association.getAssociationNodeA().isNotNull());
    /* "0..*" */
    Assert.assertTrue(association.getAssociationNodeB().isMultiple());
    Assert.assertFalse(association.getAssociationNodeB().isNotNull());
    Assert.assertEquals("R1A", association.getAssociationNodeA().getRole());
    Assert.assertEquals("R1B", association.getAssociationNodeB().getRole());
    Assert.assertFalse(association.getAssociationNodeA().isNavigable());
    Assert.assertTrue(association.getAssociationNodeB().isNavigable());
}
Also used : AssociationSimpleDefinition(io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition) Test(org.junit.Test)

Example 13 with AssociationSimpleDefinition

use of io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition in project vertigo by KleeGroup.

the class EAXmiTestParser method testAssoctationSimpleAnvB1.

/**
 * Test d'une relation Anv - B1.
 */
@Test
public void testAssoctationSimpleAnvB1() {
    final AssociationSimpleDefinition association = getAssociationSimpleDefinition("A_CHA_CHI_5");
    /* "0..*" */
    Assert.assertTrue(association.getAssociationNodeA().isMultiple());
    Assert.assertFalse(association.getAssociationNodeA().isNotNull());
    /* "0..*" */
    Assert.assertFalse(association.getAssociationNodeB().isMultiple());
    Assert.assertFalse(association.getAssociationNodeB().isNotNull());
    Assert.assertEquals("R5A", association.getAssociationNodeA().getRole());
    Assert.assertEquals("R5B", association.getAssociationNodeB().getRole());
    Assert.assertTrue(association.getAssociationNodeA().isNavigable());
    Assert.assertFalse(association.getAssociationNodeB().isNavigable());
}
Also used : AssociationSimpleDefinition(io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition) Test(org.junit.Test)

Example 14 with AssociationSimpleDefinition

use of io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition in project vertigo by KleeGroup.

the class EAXmiTestParserAA method testAssoctationA1vBn.

/**
 * Test d'une relation A1v - Bn.
 */
@Test
public void testAssoctationA1vBn() {
    final AssociationSimpleDefinition association = getAssociationSimpleDefinition("A_CHI_CHI_3");
    /* "0..1" */
    Assert.assertFalse(association.getAssociationNodeA().isMultiple());
    Assert.assertFalse(association.getAssociationNodeA().isNotNull());
    /* "0..*" */
    Assert.assertTrue(association.getAssociationNodeB().isMultiple());
    Assert.assertFalse(association.getAssociationNodeB().isNotNull());
    Assert.assertEquals("R3A", association.getAssociationNodeA().getRole());
    Assert.assertEquals("R3B", association.getAssociationNodeB().getRole());
    Assert.assertTrue(association.getAssociationNodeA().isNavigable());
    Assert.assertFalse(association.getAssociationNodeB().isNavigable());
}
Also used : AssociationSimpleDefinition(io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition) Test(org.junit.Test)

Example 15 with AssociationSimpleDefinition

use of io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition in project vertigo by KleeGroup.

the class EAXmiTestParserAA method testAssoctationAnB1v.

/**
 * Test d'une relation An - B1v.
 */
@Test
public void testAssoctationAnB1v() {
    final AssociationSimpleDefinition association = getAssociationSimpleDefinition("A_CHI_CHI_4");
    /* "0..*" */
    Assert.assertTrue(association.getAssociationNodeA().isMultiple());
    Assert.assertFalse(association.getAssociationNodeA().isNotNull());
    /* "0..1" */
    Assert.assertFalse(association.getAssociationNodeB().isMultiple());
    Assert.assertFalse(association.getAssociationNodeB().isNotNull());
    Assert.assertEquals("R4A", association.getAssociationNodeA().getRole());
    Assert.assertEquals("R4B", association.getAssociationNodeB().getRole());
    Assert.assertFalse(association.getAssociationNodeA().isNavigable());
    Assert.assertTrue(association.getAssociationNodeB().isNavigable());
}
Also used : AssociationSimpleDefinition(io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition) Test(org.junit.Test)

Aggregations

AssociationSimpleDefinition (io.vertigo.dynamo.domain.metamodel.association.AssociationSimpleDefinition)32 Test (org.junit.Test)24 DtDefinition (io.vertigo.dynamo.domain.metamodel.DtDefinition)7 AssociationNNDefinition (io.vertigo.dynamo.domain.metamodel.association.AssociationNNDefinition)5 AccountMapperHelper (io.vertigo.account.impl.account.AccountMapperHelper)3 DtField (io.vertigo.dynamo.domain.metamodel.DtField)3 AssociationDefinition (io.vertigo.dynamo.domain.metamodel.association.AssociationDefinition)3 DtListURIForSimpleAssociation (io.vertigo.dynamo.domain.metamodel.association.DtListURIForSimpleAssociation)3 URI (io.vertigo.dynamo.domain.model.URI)3 Account (io.vertigo.account.account.Account)2 AccountGroup (io.vertigo.account.account.AccountGroup)2 AccountStorePlugin (io.vertigo.account.impl.account.AccountStorePlugin)2 AbstractAccountStorePlugin (io.vertigo.account.plugins.account.store.AbstractAccountStorePlugin)2 Home (io.vertigo.app.Home)2 Criteria (io.vertigo.dynamo.criteria.Criteria)2 Criterions (io.vertigo.dynamo.criteria.Criterions)2 DtListURIForNNAssociation (io.vertigo.dynamo.domain.metamodel.association.DtListURIForNNAssociation)2 DtList (io.vertigo.dynamo.domain.model.DtList)2 DtListURI (io.vertigo.dynamo.domain.model.DtListURI)2 Entity (io.vertigo.dynamo.domain.model.Entity)2