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" });
}
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" });
}
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" });
}
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" });
}
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" });
}
Aggregations