diff options
author | 2018-10-19 13:04:36 +0200 | |
---|---|---|
committer | 2018-11-15 10:40:09 +0100 | |
commit | 598a0a928db52111744837e9d3daae4c3a5dbcdf (patch) | |
tree | bcf8099f333a7e47f06595c067ab47d6e0065944 /datafile-commons | |
parent | 7302b143f94d825f198def8c3b22c2920e6323a6 (diff) |
Clean up for Sonar
Change-Id: I5daa606cd974e43c899b7e35b14d268a255c7102
Issue-ID: DCAEGEN2-835
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
Diffstat (limited to 'datafile-commons')
2 files changed, 5 insertions, 61 deletions
diff --git a/datafile-commons/src/main/java/org/onap/dcaegen2/collectors/datafile/model/ConsumerDmaapModelForUnitTest.java b/datafile-commons/src/main/java/org/onap/dcaegen2/collectors/datafile/model/ConsumerDmaapModelForUnitTest.java deleted file mode 100644 index 62e6b1bf..00000000 --- a/datafile-commons/src/main/java/org/onap/dcaegen2/collectors/datafile/model/ConsumerDmaapModelForUnitTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * ============LICENSE_START====================================================================== - * Copyright (C) 2018 NOKIA Intellectual Property, 2018 Nordix Foundation. All rights reserved. - * =============================================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - * ============LICENSE_END======================================================================== - */ - -package org.onap.dcaegen2.collectors.datafile.model; - -public class ConsumerDmaapModelForUnitTest implements ConsumerDmaapModel { - private final String name; - private final String location; - private final String compression; - private final String fileFormatType; - private final String fileFormatVersion; - - public ConsumerDmaapModelForUnitTest() { - this.name = "A20161224.1030-1045.bin.gz"; - this.location = "target/A20161224.1030-1045.bin.gz"; - this.compression = "gzip"; - this.fileFormatType = "org.3GPP.32.435#measCollec"; - this.fileFormatVersion = "V10"; - } - - @Override - public String getName() { - return name; - } - - @Override - public String getLocation() { - return location; - } - - @Override - public String getCompression() { - return compression; - } - - @Override - public String getFileFormatType() { - return fileFormatType; - } - - @Override - public String getFileFormatVersion() { - return fileFormatVersion; - } -} 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 f27e3b6c..7ec6f50e 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,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; class CommonFunctionsTest { - private ConsumerDmaapModel model = new ConsumerDmaapModelForUnitTest(); + private ConsumerDmaapModel model = ImmutableConsumerDmaapModel.builder().name("A20161224.1030-1045.bin.gz") + .location("target/A20161224.1030-1045.bin.gz").compression("gzip") + .fileFormatType("org.3GPP.32.435#measCollec").fileFormatVersion("V10").build(); private static final String EXPECTED_RESULT = "{\"name\":\"A20161224.1030-1045.bin.gz\",\"location\":\"target/A20161224.1030-1045.bin.gz\"," - + "\"compression\":\"gzip\",\"fileFormatType\":\"org.3GPP.32.435#measCollec\"," - + "\"fileFormatVersion\":\"V10\"}"; + + "\"compression\":\"gzip\",\"fileFormatType\":\"org.3GPP.32.435#measCollec\"," + + "\"fileFormatVersion\":\"V10\"}"; @Test void createJsonBody_shouldReturnJsonInString() { |