diff options
author | Joseph O'Leary <joseph.o.leary@est.tech> | 2020-07-20 10:26:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-07-20 10:26:16 +0000 |
commit | bd0a411d6f04f92d222af6a63bd2b7ecc3edd0a2 (patch) | |
tree | 34a84a1f044bb102225abed856412656fbfa117d /src/test/java/org | |
parent | ba384eeb3cc007ff1d48db04fecc9356069456c5 (diff) | |
parent | c62f765c1ed65829e126807e1e7a91388bb1c322 (diff) |
Merge "Adjust pm-mapper to accept new schema."
Diffstat (limited to 'src/test/java/org')
5 files changed, 8 insertions, 9 deletions
diff --git a/src/test/java/org/onap/dcaegen2/services/pmmapper/filtering/MeasFilterHandlerTest.java b/src/test/java/org/onap/dcaegen2/services/pmmapper/filtering/MeasFilterHandlerTest.java index 3eea765..b4fce87 100644 --- a/src/test/java/org/onap/dcaegen2/services/pmmapper/filtering/MeasFilterHandlerTest.java +++ b/src/test/java/org/onap/dcaegen2/services/pmmapper/filtering/MeasFilterHandlerTest.java @@ -49,12 +49,10 @@ import org.onap.dcaegen2.services.pmmapper.model.measurement.common.MeasurementF import org.onap.dcaegen2.services.pmmapper.utils.MeasConverter; import io.undertow.server.HttpServerExchange; -import org.powermock.core.classloader.annotations.PowerMockIgnore; import utils.ArgumentCreator; import utils.EventUtils; @ExtendWith(MockitoExtension.class) -@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.parsers.*", "org.xml.*", "javax.management.*"}) class MeasFilterHandlerTest { private static final Path FILTER_DIRECTORY = Paths.get("src/test/resources/filter_test/"); @@ -211,7 +209,7 @@ class MeasFilterHandlerTest { testEvent.setFilter(generateValidFilter()); return Arguments.of(expectedEvent, testEvent); }; - return EventUtils.generateEventArguments(FILTER_DIRECTORY, "nr", creator); + return EventUtils.generateEventArguments(FILTER_DIRECTORY, creator); } diff --git a/src/test/java/org/onap/dcaegen2/services/pmmapper/filtering/MetadataFilterTest.java b/src/test/java/org/onap/dcaegen2/services/pmmapper/filtering/MetadataFilterTest.java index bf232ea..7ee13b7 100644 --- a/src/test/java/org/onap/dcaegen2/services/pmmapper/filtering/MetadataFilterTest.java +++ b/src/test/java/org/onap/dcaegen2/services/pmmapper/filtering/MetadataFilterTest.java @@ -123,6 +123,6 @@ public class MetadataFilterTest { return Arguments.of(testEvent); }; - return EventUtils.generateEventArguments(DATA_DIRECTORY, "/nr", creator); + return EventUtils.generateEventArguments(DATA_DIRECTORY, creator); } }
\ No newline at end of file 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 2356a57..7ddc929 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 @@ -120,9 +120,9 @@ class MapperTest { doThrow(new TemplateException(mock(Environment.class))).when(mappingTemplateMock) .process(any(), any()); HashMap<String, Template> templates = new HashMap<>(); - templates.put("org.3GPP.28.550#measData", mappingTemplateMock); + templates.put("org.3GPP.28.532#measData", mappingTemplateMock); Whitebox.setInternalState(objUnderTest, "templates", templates); - Path testFile = Paths.get(dataDirectory + "/28.550/no_measdata/test.xml"); + Path testFile = Paths.get(dataDirectory + "/28.532/no_measdata/test.xml"); Event testEvent = EventUtils.makeMockEvent(EventUtils.fileContentsToString(testFile), fifthGenerationMetadata); assertThrows(MappingException.class, () -> objUnderTest.map(testEvent)); } @@ -185,7 +185,7 @@ class MapperTest { Event testEvent = EventUtils.makeMockEvent(EventUtils.fileContentsToString(testEventPath), eventMetadata); return Arguments.of(testEvent); }; - return EventUtils.generateEventArguments(dataDirectory, "/28.550", creator); + return EventUtils.generateEventArguments(dataDirectory, creator); } } diff --git a/src/test/java/org/onap/dcaegen2/services/pmmapper/utils/MeasSplitterTest.java b/src/test/java/org/onap/dcaegen2/services/pmmapper/utils/MeasSplitterTest.java index 120bea1..5ab0d38 100644 --- a/src/test/java/org/onap/dcaegen2/services/pmmapper/utils/MeasSplitterTest.java +++ b/src/test/java/org/onap/dcaegen2/services/pmmapper/utils/MeasSplitterTest.java @@ -38,6 +38,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
+import org.mockito.Mockito;
import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.dcaegen2.services.pmmapper.model.Event;
import org.onap.dcaegen2.services.pmmapper.model.EventMetadata;
@@ -95,6 +96,6 @@ class MeasSplitterTest { Event testEvent = EventUtils.makeMockEvent(EventUtils.fileContentsToString(testEventPath), metadata);
return Arguments.of(numberOfEvents, measInfoIds, testEvent);
};
- return EventUtils.generateEventArguments(Paths.get(baseDir), "nr", splitterCreator);
+ return EventUtils.generateEventArguments(Paths.get(baseDir), splitterCreator);
}
}
diff --git a/src/test/java/org/onap/dcaegen2/services/pmmapper/utils/XMLValidatorTest.java b/src/test/java/org/onap/dcaegen2/services/pmmapper/utils/XMLValidatorTest.java index 655fc7a..56bd18d 100644 --- a/src/test/java/org/onap/dcaegen2/services/pmmapper/utils/XMLValidatorTest.java +++ b/src/test/java/org/onap/dcaegen2/services/pmmapper/utils/XMLValidatorTest.java @@ -102,6 +102,6 @@ class XMLValidatorTest { EventUtils.fileContentsToString(testEventPath), metadata, new HashMap<>(), ""); return Arguments.of(valid, testEvent); }; - return EventUtils.generateEventArguments(dataDirectory, "nr", creator); + return EventUtils.generateEventArguments(dataDirectory, creator); } } |