From ea5f0af6c28863b5f8ee220e105b6c3221c68b03 Mon Sep 17 00:00:00 2001 From: emartin Date: Mon, 15 Apr 2019 11:03:19 +0000 Subject: Fix mapping localDn to be optional field Change-Id: I7d1d4b75ac18e42633206dd5870afeb01a3bc504 Issue-ID: DCAEGEN2-1435 Signed-off-by: emartin --- src/test/java/org/onap/dcaegen2/services/pmmapper/AppTest.java | 2 +- .../org/onap/dcaegen2/services/pmmapper/mapping/MapperTest.java | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'src/test/java') 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); -- cgit 1.2.3-korg