@Test public void testMakeDMNIncludeModel() { final Path path = mock(Path.class); final IncludedModel includedModel = mock(IncludedModel.class); final String drgElementId = "0000-1111-3333-4444"; final String drgElementName = "Can Drive?"; final String expectedFileName = "file.dmn"; final String expectedModelName = "model"; final String expectedImportedElementId = "0000-1111-3333-4444"; final String expectedImportedElementName = "model.Can Drive?"; final String expectedImportedItemDefinitionName = "model.tCustomBoolean"; final DRGElement importedElementId = makeDecision(drgElementId, drgElementName, "tCustomBoolean"); when(path.getFileName()).thenReturn(expectedFileName); when(includedModel.getModelName()).thenReturn(expectedModelName); final DMNIncludedNode node = factory.makeDMNIncludeModel(path, includedModel, importedElementId); final Decision drgElement = (Decision) node.getDrgElement(); assertEquals(expectedImportedElementId, drgElement.getId().getValue()); assertEquals(expectedImportedElementName, drgElement.getName().getValue()); assertEquals(expectedImportedItemDefinitionName, drgElement.getVariable().getTypeRef().getLocalPart()); assertEquals(expectedFileName, node.getFileName()); assertTrue(drgElement.isAllowOnlyVisualChange()); }
DMNIncludedNode makeDMNIncludeModel(final Path path, final IncludedModel includeModel, final DRGElement drgElement) { final String fileName = path.getFileName(); return new DMNIncludedNode(fileName, withNamespace(drgElement, includeModel)); }
DMNIncludedNodeFactory { DMNIncludedNode makeDMNIncludeModel(final Path path, final IncludedModel includeModel, final DRGElement drgElement) { final String fileName = path.getFileName(); return new DMNIncludedNode(fileName, withNamespace(drgElement, includeModel)); } }
DMNIncludedNodeFactory { DMNIncludedNode makeDMNIncludeModel(final Path path, final IncludedModel includeModel, final DRGElement drgElement) { final String fileName = path.getFileName(); return new DMNIncludedNode(fileName, withNamespace(drgElement, includeModel)); }  }
DMNIncludedNodeFactory { DMNIncludedNode makeDMNIncludeModel(final Path path, final IncludedModel includeModel, final DRGElement drgElement) { final String fileName = path.getFileName(); return new DMNIncludedNode(fileName, withNamespace(drgElement, includeModel)); }   }
DMNIncludedNodeFactory { DMNIncludedNode makeDMNIncludeModel(final Path path, final IncludedModel includeModel, final DRGElement drgElement) { final String fileName = path.getFileName(); return new DMNIncludedNode(fileName, withNamespace(drgElement, includeModel)); }    }