Search in sources :

Example 6 with UseCase

use of org.obeonetwork.graal.UseCase in project InformationSystem by ObeoNetwork.

the class UseCaseServicesTest method testReferencedByNamespacesDomainClasses.

@Test
public void testReferencedByNamespacesDomainClasses() {
    System system = loadRoot("ReferencedByNamespacesDomainClasses.graal", System.class);
    UseCase useCase = query(() -> {
        return (UseCase) system.getUseCases().get(0);
    });
    verifyAllDomainClasses(useCase, new String[] { "ns1.ns3.DomainClass6", "ns1.ns3.DomainClass7", "ns2.DomainClass1", "ns2.DomainClass2", "ns2.DomainClass4" });
}
Also used : UseCase(org.obeonetwork.graal.UseCase) System(org.obeonetwork.graal.System) Test(org.junit.Test)

Example 7 with UseCase

use of org.obeonetwork.graal.UseCase in project InformationSystem by ObeoNetwork.

the class UseCaseServicesTest method testOtherStructuredTypes.

@Test
public void testOtherStructuredTypes() {
    // StructuredTypes of another type than DomainClass  should not be returned
    System system = loadRoot("OtherStructuredTypes.graal", System.class);
    UseCase useCase = query(() -> {
        return (UseCase) system.getUseCases().get(0);
    });
    assertTrue(useCase.getTypes().get(1) instanceof Entity);
    verifyAllDomainClasses(useCase, new String[] { "ns1.ns3.DomainClass7", "ns2.DomainClass1" });
}
Also used : Entity(org.obeonetwork.dsl.entity.Entity) UseCase(org.obeonetwork.graal.UseCase) System(org.obeonetwork.graal.System) Test(org.junit.Test)

Example 8 with UseCase

use of org.obeonetwork.graal.UseCase in project InformationSystem by ObeoNetwork.

the class UseCaseServicesTest method testReferencedByTypesDomainClasses.

@Test
public void testReferencedByTypesDomainClasses() {
    System system = loadRoot("ReferencedByTypesDomainClasses.graal", System.class);
    UseCase useCase = query(() -> {
        return (UseCase) system.getUseCases().get(0);
    });
    verifyAllDomainClasses(useCase, new String[] { "ns1.DomainClass3", "ns2.DomainClass2" });
}
Also used : UseCase(org.obeonetwork.graal.UseCase) System(org.obeonetwork.graal.System) Test(org.junit.Test)

Example 9 with UseCase

use of org.obeonetwork.graal.UseCase in project InformationSystem by ObeoNetwork.

the class UseCaseServicesTest method testAllKindsOfReferences.

@Test
public void testAllKindsOfReferences() {
    System system = loadRoot("AllKindsOfReferences.graal", System.class);
    UseCase useCase = query(() -> {
        return (UseCase) system.getUseCases().get(0);
    });
    verifyAllDomainClasses(useCase, new String[] { "ns1.DomainClass3", "ns1.ns3.DomainClass6", "ns1.ns3.DomainClass7", "ns2.DomainClass1", "ns2.DomainClass2" });
}
Also used : UseCase(org.obeonetwork.graal.UseCase) System(org.obeonetwork.graal.System) Test(org.junit.Test)

Example 10 with UseCase

use of org.obeonetwork.graal.UseCase in project InformationSystem by ObeoNetwork.

the class UseCaseServicesTest method testNoDuplicates.

@Test
public void testNoDuplicates() {
    System system = loadRoot("NoDuplicates.graal", System.class);
    UseCase useCase = query(() -> {
        return (UseCase) system.getUseCases().get(0);
    });
    verifyAllDomainClasses(useCase, new String[] { "ns1.DomainClass3", "ns1.ns3.DomainClass6", "ns2.DomainClass1", "ns2.DomainClass2", "ns2.DomainClass4" });
}
Also used : UseCase(org.obeonetwork.graal.UseCase) System(org.obeonetwork.graal.System) Test(org.junit.Test)

Aggregations

UseCase (org.obeonetwork.graal.UseCase)14 System (org.obeonetwork.graal.System)12 Test (org.junit.Test)9 EObject (org.eclipse.emf.ecore.EObject)2 EReference (org.eclipse.emf.ecore.EReference)2 Setting (org.eclipse.emf.ecore.EStructuralFeature.Setting)2 Resource (org.eclipse.emf.ecore.resource.Resource)2 AbstractTask (org.obeonetwork.graal.AbstractTask)2 GraalUsageCrossReferencer (org.obeonetwork.graal.util.GraalUsageCrossReferencer)2 Date (java.util.Date)1 EObjectFilter (org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter)1 ReferencesTableSettings (org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings)1 InputDialog (org.eclipse.jface.dialogs.InputDialog)1 Entity (org.obeonetwork.dsl.entity.Entity)1 TasksContainer (org.obeonetwork.graal.TasksContainer)1 TasksGroup (org.obeonetwork.graal.TasksGroup)1 UseCasePropertiesEditionPart (org.obeonetwork.graal.parts.UseCasePropertiesEditionPart)1