diff options
Diffstat (limited to 'datafile-commons/src/test')
2 files changed, 8 insertions, 8 deletions
diff --git a/datafile-commons/src/test/java/org/onap/dcaegen2/collectors/datafile/model/CommonFunctionsTest.java b/datafile-commons/src/test/java/org/onap/dcaegen2/collectors/datafile/model/CommonFunctionsTest.java index 062724e7..f27e3b6c 100644 --- a/datafile-commons/src/test/java/org/onap/dcaegen2/collectors/datafile/model/CommonFunctionsTest.java +++ b/datafile-commons/src/test/java/org/onap/dcaegen2/collectors/datafile/model/CommonFunctionsTest.java @@ -21,11 +21,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; class CommonFunctionsTest { - // Given private ConsumerDmaapModel model = new ConsumerDmaapModelForUnitTest(); private static final String EXPECTED_RESULT = - "{\"location\":\"target/A20161224.1030-1045.bin.gz\",\"compression\":\"gzip\"," - + "\"fileFormatType\":\"org.3GPP.32.435#measCollec\",\"fileFormatVersion\":\"V10\"}"; + "{\"name\":\"A20161224.1030-1045.bin.gz\",\"location\":\"target/A20161224.1030-1045.bin.gz\"," + + "\"compression\":\"gzip\",\"fileFormatType\":\"org.3GPP.32.435#measCollec\"," + + "\"fileFormatVersion\":\"V10\"}"; @Test void createJsonBody_shouldReturnJsonInString() { diff --git a/datafile-commons/src/test/java/org/onap/dcaegen2/collectors/datafile/model/ConsumerDmaapModelTest.java b/datafile-commons/src/test/java/org/onap/dcaegen2/collectors/datafile/model/ConsumerDmaapModelTest.java index 5b028973..e80670d3 100644 --- a/datafile-commons/src/test/java/org/onap/dcaegen2/collectors/datafile/model/ConsumerDmaapModelTest.java +++ b/datafile-commons/src/test/java/org/onap/dcaegen2/collectors/datafile/model/ConsumerDmaapModelTest.java @@ -21,6 +21,7 @@ import org.junit.jupiter.api.Test; public class ConsumerDmaapModelTest { + private static final String NAME = "A20161224.1030-1045.bin.gz"; private static final String LOCATION = "target/A20161224.1030-1045.bin.gz"; private static final String COMPRESSION = "gzip"; private static final String FILE_FORMAT_TYPE = "org.3GPP.32.435#measCollec"; @@ -29,13 +30,12 @@ public class ConsumerDmaapModelTest { @Test public void consumerDmaapModelBuilder_shouldBuildAnObject() { - // When - // Given - ConsumerDmaapModel consumerDmaapModel = ImmutableConsumerDmaapModel.builder().location(LOCATION).compression(COMPRESSION) - .fileFormatType(FILE_FORMAT_TYPE).fileFormatVersion(FILE_FORMAT_VERSION).build(); + ConsumerDmaapModel consumerDmaapModel = + ImmutableConsumerDmaapModel.builder().name(NAME).location(LOCATION).compression(COMPRESSION) + .fileFormatType(FILE_FORMAT_TYPE).fileFormatVersion(FILE_FORMAT_VERSION).build(); - // Then Assertions.assertNotNull(consumerDmaapModel); + Assertions.assertEquals(NAME, consumerDmaapModel.getName()); Assertions.assertEquals(LOCATION, consumerDmaapModel.getLocation()); Assertions.assertEquals(COMPRESSION, consumerDmaapModel.getCompression()); Assertions.assertEquals(FILE_FORMAT_TYPE, consumerDmaapModel.getFileFormatType()); |