diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/onap/dcaegen2/services/pmmapper/AppTest.java | 2 | ||||
-rw-r--r-- | src/test/java/org/onap/dcaegen2/services/pmmapper/mapping/MapperTest.java | 7 | ||||
-rw-r--r-- | src/test/resources/xml_validator_test/test_data/invalid/no_managed_element.xml (renamed from src/test/resources/mapper_test/mapping_data/invalid_data/no_managed_element.xml) | 0 |
3 files changed, 1 insertions, 8 deletions
diff --git a/src/test/java/org/onap/dcaegen2/services/pmmapper/AppTest.java b/src/test/java/org/onap/dcaegen2/services/pmmapper/AppTest.java index 7c5340a..2db24b4 100644 --- a/src/test/java/org/onap/dcaegen2/services/pmmapper/AppTest.java +++ b/src/test/java/org/onap/dcaegen2/services/pmmapper/AppTest.java @@ -171,7 +171,7 @@ class AppTest { String metadataFileContents = new String(Files.readAllBytes(metadata)); eventMetadata = new Gson().fromJson(metadataFileContents, EventMetadata.class); - Path testFile = Paths.get(dataDirectory + "/invalid_data/no_managed_element.xml"); + Path testFile = Paths.get("src/test/resources/xml_validator_test/test_data/invalid/no_managed_element.xml"); Event mockEvent = EventUtils.makeMockEvent(EventUtils.fileContentsToString(testFile), eventMetadata); boolean result = App.validate(mockValidator, mockEvent, mockConfig); diff --git a/src/test/java/org/onap/dcaegen2/services/pmmapper/mapping/MapperTest.java b/src/test/java/org/onap/dcaegen2/services/pmmapper/mapping/MapperTest.java index 8670bed..7a8602e 100644 --- a/src/test/java/org/onap/dcaegen2/services/pmmapper/mapping/MapperTest.java +++ b/src/test/java/org/onap/dcaegen2/services/pmmapper/mapping/MapperTest.java @@ -98,13 +98,6 @@ class MapperTest { vesSchema.validate(new JSONObject(objUnderTest.map(testEvent))); } - @ParameterizedTest - @MethodSource("getInvalidEvents") - void testInvalidEvent(Event testEvent) { - when(converter.convert(any(MeasCollecFile.class))).thenReturn(testEvent.getBody()); - assertThrows(MappingException.class, () -> objUnderTest.map(testEvent)); - } - @Test void testFailureToProcess() throws IOException, TemplateException { Template mappingTemplateMock = mock(Template.class, RETURNS_DEEP_STUBS); diff --git a/src/test/resources/mapper_test/mapping_data/invalid_data/no_managed_element.xml b/src/test/resources/xml_validator_test/test_data/invalid/no_managed_element.xml index b1b3d68..b1b3d68 100644 --- a/src/test/resources/mapper_test/mapping_data/invalid_data/no_managed_element.xml +++ b/src/test/resources/xml_validator_test/test_data/invalid/no_managed_element.xml |