diff options
author | emartin <ephraim.martin@est.tech> | 2019-04-05 16:43:46 +0000 |
---|---|---|
committer | emartin <ephraim.martin@est.tech> | 2019-04-05 16:43:46 +0000 |
commit | ccdc2ae3ddbaf63164ddd9ae4af2274944cb2c4c (patch) | |
tree | 0929b925ceef869dc2bac66551840bd44b5924d6 /src/test/java/org/onap | |
parent | 49d2deae8aa7b57ecf6fb692803594c1bae8e8bf (diff) |
Fix issue with filtering multiple measValue
Change-Id: I8f81510445edf276561645bdd4549a8c18207b57
Issue-ID: DCAEGEN2-1327
Signed-off-by: emartin <ephraim.martin@est.tech>
Diffstat (limited to 'src/test/java/org/onap')
-rw-r--r-- | src/test/java/org/onap/dcaegen2/services/pmmapper/filtering/MeasFilterHandlerTest.java | 14 |
1 files changed, 14 insertions, 0 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 694b4e9..031a3c8 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 @@ -183,6 +183,20 @@ class MeasFilterHandlerTest { } @Test + void multiple_measValues() { + String inputPath = baseDir + "meas_type_and_r_manyMeasvalue"; + String filteredString = EventUtils.fileContentsToString(Paths.get(inputPath + "_filtered.xml")); + Event event = generateEvent(inputPath, generateValidFilter()); + + MeasCollecFile f = converter.convert(filteredString); + String expected = converter.convert(f); + objUnderTest.filterByMeasType(event); + + String actual = converter.convert(event.getMeasCollecFile()); + assertEquals(expected, actual); + } + + @Test void valid_fileType() { Event event = mock(Event.class); when(event.getHttpServerExchange()).thenReturn(exchange); |