use of org.eclipse.bpmn2.Import in project drools by kiegroup.
the class ImportDMNResolverUtilTest method testNSnoModelNameDefaultWithAliasButUnexistent.
@Test
public void testNSnoModelNameDefaultWithAliasButUnexistent() {
Import i = makeImport("ns1", "boh", null);
List<QName> available = Arrays.asList(new QName("ns1", "m1"), new QName("ns2", "m2"), new QName("ns3", "m3"));
Either<String, QName> result = ImportDMNResolverUtil.resolveImportDMN(i, available, Function.identity());
assertTrue(result.isLeft());
}
use of org.eclipse.bpmn2.Import in project drools by kiegroup.
the class ImportDMNResolverUtilTest method testLocateInNSdefaultWithAliasunexistent.
@Test
public void testLocateInNSdefaultWithAliasunexistent() {
Import i = makeImport("nsA", "boh", null);
List<QName> available = Arrays.asList(new QName("nsA", "m1"), new QName("nsA", "m2"), new QName("nsB", "m3"));
Either<String, QName> result = ImportDMNResolverUtil.resolveImportDMN(i, available, Function.identity());
assertTrue(result.isLeft());
}
use of org.eclipse.bpmn2.Import in project kie-wb-common by kiegroup.
the class PropertyReaderUtilsTest method toWSDLImports.
@Test
public void toWSDLImports() {
final String LOCATION = "location";
final String NAMESPACE = "namespace";
WSDLImport wsdlImport = new WSDLImport(LOCATION, NAMESPACE);
Import imp = PropertyWriterUtils.toImport(wsdlImport);
WSDLImport result = PropertyReaderUtils.toWSDLImports(imp);
assertEquals("location", result.getLocation());
assertEquals("namespace", result.getNamespace());
}
use of org.eclipse.bpmn2.Import in project kie-wb-common by kiegroup.
the class DefinitionsConverterTest method assertImportsValue.
private void assertImportsValue(String LOCATION, String NAMESPACE, Definitions definitions) {
Import imp = definitions.getImports().get(0);
assertNotNull(imp);
assertEquals(LOCATION, imp.getLocation());
assertEquals(NAMESPACE, imp.getNamespace());
}
use of org.eclipse.bpmn2.Import in project kie-wb-common by kiegroup.
the class PropertyWriterUtilsTest method toImport.
@Test
public void toImport() {
final String LOCATION = "location";
final String NAMESPACE = "namespace";
WSDLImport wsdlImport = new WSDLImport(LOCATION, NAMESPACE);
Import imp = PropertyWriterUtils.toImport(wsdlImport);
assertEquals(LOCATION, imp.getLocation());
assertEquals(NAMESPACE, imp.getNamespace());
}
Aggregations