diff options
author | emartin <ephraim.martin@est.tech> | 2019-04-15 11:03:19 +0000 |
---|---|---|
committer | emartin <ephraim.martin@est.tech> | 2019-04-15 11:03:19 +0000 |
commit | ea5f0af6c28863b5f8ee220e105b6c3221c68b03 (patch) | |
tree | 704f0e9f8986fd4953ff067e211354c223766f86 /src/test/java | |
parent | b5de77cd48e6c976449841c7072417607eb3c18c (diff) |
Fix mapping localDn to be optional field
Change-Id: I7d1d4b75ac18e42633206dd5870afeb01a3bc504
Issue-ID: DCAEGEN2-1435
Signed-off-by: emartin <ephraim.martin@est.tech>
Diffstat (limited to 'src/test/java')
-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 |
2 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); |