diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/docks/navigator/included/components/DecisionComponentsTest.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/docks/navigator/included/components/DecisionComponentsTest.java index 9a07a7da1bf..646067a8cc8 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/docks/navigator/included/components/DecisionComponentsTest.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/docks/navigator/included/components/DecisionComponentsTest.java @@ -411,7 +411,7 @@ public void testAsDMNIncludedModel() { final String namespace = "The Namespace"; final String type = "The type"; final String file = "my file.dmn"; - final String filePath = "//users//some//" + file; + final String filePath = "users/some/" + file; final Import anImport = new Import(); anImport.setName(new Name(modelName)); anImport.setNamespace(namespace); @@ -423,7 +423,7 @@ public void testAsDMNIncludedModel() { assertEquals(modelName, includedModel.getModelName()); assertEquals(namespace, includedModel.getNamespace()); assertEquals(type, includedModel.getImportType()); - assertEquals(file, includedModel.getPath()); + assertEquals(filePath, includedModel.getPath()); } @Test diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/included/modal/dropdown/DMNAssetsDropdownItemsProviderTest.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/included/modal/dropdown/DMNAssetsDropdownItemsProviderTest.java index 5996eda4c13..5b322195a2f 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/included/modal/dropdown/DMNAssetsDropdownItemsProviderTest.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/editors/included/modal/dropdown/DMNAssetsDropdownItemsProviderTest.java @@ -153,8 +153,8 @@ public void testWrapPMMLItems() { final IncludedModel includedModel5 = makePMMLIncludedModel(5); final Import import1 = mock(Import.class); final Import import2 = mock(Import.class); - final LocationURI import1URI = new LocationURI("/src/main/kie3"); - final LocationURI import2URI = new LocationURI("/src/main/kie4"); + final LocationURI import1URI = new LocationURI("src/main/kie3.pmml"); + final LocationURI import2URI = new LocationURI("src/main/kie4.pmml"); final KieAssetsDropdownItem dropdownItem1 = mock(KieAssetsDropdownItem.class); final KieAssetsDropdownItem dropdownItem2 = mock(KieAssetsDropdownItem.class); final KieAssetsDropdownItem dropdownItem5 = mock(KieAssetsDropdownItem.class); @@ -182,9 +182,9 @@ private PMMLIncludedModel makePMMLIncludedModel(final int id, final int modelCount) { return new PMMLIncludedModel("name" + id, "com.kie.pmml", - "src/main/kie" + id, + "src/main/kie" + id + ".pmml", PMML.getDefaultNamespace(), - "https://kie.org/pmml#src/main/kie" + id, + "https://kie.org/pmml#src/main/kie" + id + ".pmml", modelCount); } diff --git a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/marshaller/included/DMNMarshallerImportsClientHelperTest.java b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/marshaller/included/DMNMarshallerImportsClientHelperTest.java index 887225b86ad..701d01a10eb 100644 --- a/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/marshaller/included/DMNMarshallerImportsClientHelperTest.java +++ b/packages/stunner-editors/kie-wb-common-dmn/kie-wb-common-dmn-client/src/test/java/org/kie/workbench/common/dmn/client/marshaller/included/DMNMarshallerImportsClientHelperTest.java @@ -136,7 +136,7 @@ public void loadModelsPMMLFile() { verify(includedModelServiceCallback).onSuccess(modelsCapture.capture()); assertEquals(1, modelsCapture.getValue().size()); - assertEquals(PMML_FILE, modelsCapture.getValue().get(0).getPath()); + assertEquals(PMML_PATH, modelsCapture.getValue().get(0).getPath()); assertEquals(PMML_FILE, modelsCapture.getValue().get(0).getModelName()); assertEquals(PMML.getDefaultNamespace(), modelsCapture.getValue().get(0).getImportType()); assertEquals(0, ((PMMLIncludedModel) modelsCapture.getValue().get(0)).getModelCount().intValue()); @@ -196,7 +196,7 @@ public void getPMMLDocumentsAsync() { final List imports = new ArrayList<>(); final JSITImport jsImportMock = mock(JSITImport.class); - when(jsImportMock.getLocationURI()).thenReturn(PMML_FILE); + when(jsImportMock.getLocationURI()).thenReturn(PMML_PATH); imports.add(jsImportMock); final Promise> returnPromise = importsHelper.getPMMLDocumentsAsync(metadataMock, imports); @@ -223,17 +223,17 @@ public void getPMMLDocumentsMetadataFromFilesEmptyFiles() { @Test public void getPMMLDocumentsMetadataFromFiles() { - final PMMLDocumentMetadata documentMetadata = new PMMLDocumentMetadata(PMML_FILE, + final PMMLDocumentMetadata documentMetadata = new PMMLDocumentMetadata(PMML_PATH, PMML.getDefaultNamespace(), Collections.emptyList()); - final List includedModels = Arrays.asList(new PMMLIncludedModel(PMML_MODEL_NAME, "", PMML_FILE, PMML.getDefaultNamespace(), "https://kie.org/pmml#" + PMML_FILE, 0)); + final List includedModels = Arrays.asList(new PMMLIncludedModel(PMML_MODEL_NAME, "", PMML_PATH, PMML.getDefaultNamespace(), "https://kie.org/pmml#" + PMML_FILE, 0)); when(dmnImportsContentService.getModelsPMMLFilesURIs()).thenReturn(promises.resolve(new String[]{PMML_PATH})); when(dmnImportsContentService.loadFile(PMML_PATH)).thenReturn(promises.resolve(PMML_CONTENT)); doReturn(promises.resolve(documentMetadata)).when(dmnImportsContentService).getPMMLDocumentMetadata(PMML_PATH); importsHelper.getPMMLDocumentsMetadataFromFiles(includedModels, pmmlMetadataServiceCallback); verify(pmmlMetadataServiceCallback, times(1)).onSuccess(pmmlDocumentMetadataArgumentCaptor.capture()); assertEquals(1, pmmlDocumentMetadataArgumentCaptor.getValue().size()); - assertEquals(PMML_FILE, pmmlDocumentMetadataArgumentCaptor.getValue().get(0).getPath()); + assertEquals(PMML_PATH, pmmlDocumentMetadataArgumentCaptor.getValue().get(0).getPath()); assertEquals(PMML_MODEL_NAME, pmmlDocumentMetadataArgumentCaptor.getValue().get(0).getName()); assertEquals(PMML.getDefaultNamespace(), pmmlDocumentMetadataArgumentCaptor.getValue().get(0).getImportType()); assertTrue(pmmlDocumentMetadataArgumentCaptor.getValue().get(0).getModels().isEmpty());