diff options
Diffstat (limited to 'components')
8 files changed, 56 insertions, 0 deletions
diff --git a/components/slice-analysis-ms/ChangeLog.md b/components/slice-analysis-ms/ChangeLog.md index 08bc5b5d..f3a6910b 100644 --- a/components/slice-analysis-ms/ChangeLog.md +++ b/components/slice-analysis-ms/ChangeLog.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [1.1.4] - 2022/07/28 - [DCAEGEN2-3120](https://jira.onap.org/browse/DCAEGEN2-3120) - Enhance sliceanalysis MS to use DCAE SDK dmaap-client lib + - [DCAEGEN2-3157](https://jira.onap.org/browse/DCAEGEN2-3157) - CodeCoverage improvement for dcaegen2-services-slice-analysis-ms ## [1.1.3] - 2022/05/11 - [DCAEGEN2-3156](https://jira.onap.org/browse/DCAEGEN2-3156) - Fix bug in fetching PM data from DES diff --git a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/AggregatedConfigTest.java b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/AggregatedConfigTest.java index c8d999ea..e9097adf 100644 --- a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/AggregatedConfigTest.java +++ b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/AggregatedConfigTest.java @@ -21,6 +21,7 @@ package org.onap.slice.analysis.ms.models; +import nl.jqno.equalsverifier.EqualsVerifier; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.junit.runner.RunWith; @@ -30,6 +31,8 @@ import org.powermock.modules.junit4.PowerMockRunnerDelegate; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; +import javax.validation.constraints.NotEmpty; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -72,4 +75,10 @@ public class AggregatedConfigTest { assertTrue(StringUtils.isNotBlank(aggregatedConfig.toString())); assertTrue(aggregatedConfig.hashCode() != 0); } + @Test + public void equalsContract() { + EqualsVerifier.simple().forClass(AggregatedConfig.class) + .withIgnoredAnnotations(NotEmpty.class) + .verify(); + } } diff --git a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigDetailsTest.java b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigDetailsTest.java index b843df5c..c1f30002 100644 --- a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigDetailsTest.java +++ b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigDetailsTest.java @@ -21,6 +21,7 @@ package org.onap.slice.analysis.ms.models; +import nl.jqno.equalsverifier.EqualsVerifier; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.junit.runner.RunWith; @@ -30,6 +31,8 @@ import org.powermock.modules.junit4.PowerMockRunnerDelegate; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; +import javax.validation.constraints.NotEmpty; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -70,4 +73,11 @@ public class SliceConfigDetailsTest { assertTrue(StringUtils.isNotBlank(sliceConfigDetails.toString())); assertTrue(sliceConfigDetails.hashCode() != 0); } + + @Test + public void equalsContract() { + EqualsVerifier.simple().forClass(SliceConfigDetails.class) + .withIgnoredAnnotations(NotEmpty.class) + .verify(); + } } diff --git a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigRequestTest.java b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigRequestTest.java index f688bb68..bccc9b6b 100644 --- a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigRequestTest.java +++ b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigRequestTest.java @@ -21,6 +21,7 @@ package org.onap.slice.analysis.ms.models; +import nl.jqno.equalsverifier.EqualsVerifier; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.junit.runner.RunWith; @@ -30,6 +31,7 @@ import org.powermock.modules.junit4.PowerMockRunnerDelegate; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; +import javax.validation.constraints.NotEmpty; import java.util.ArrayList; import java.util.List; @@ -76,4 +78,10 @@ public class SliceConfigRequestTest { assertTrue(StringUtils.isNotBlank(sliceConfigRequest.toString())); assertTrue(sliceConfigRequest.hashCode() != 0); } + @Test + public void equalsContract() { + EqualsVerifier.simple().forClass(SliceConfigRequest.class) + .withIgnoredAnnotations(NotEmpty.class) + .verify(); + } } diff --git a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigResponseTest.java b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigResponseTest.java index 78c42dae..c8373c86 100644 --- a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigResponseTest.java +++ b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/SliceConfigResponseTest.java @@ -21,6 +21,7 @@ package org.onap.slice.analysis.ms.models; +import nl.jqno.equalsverifier.EqualsVerifier; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.junit.runner.RunWith; @@ -30,6 +31,7 @@ import org.powermock.modules.junit4.PowerMockRunnerDelegate; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; +import javax.validation.constraints.NotEmpty; import java.util.ArrayList; import java.util.List; @@ -70,4 +72,10 @@ public class SliceConfigResponseTest { assertTrue(StringUtils.isNotBlank(sliceConfigResponse.toString())); assertTrue(sliceConfigResponse.hashCode() != 0); } + @Test + public void equalsContract() { + EqualsVerifier.simple().forClass(SliceConfigResponse.class) + .withIgnoredAnnotations(NotEmpty.class) + .verify(); + } } diff --git a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/RelationshipListTest.java b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/RelationshipListTest.java index 5e7640f6..8ecd395b 100644 --- a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/RelationshipListTest.java +++ b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/RelationshipListTest.java @@ -24,6 +24,7 @@ package org.onap.slice.analysis.ms.models.aai; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.JsonArray; +import nl.jqno.equalsverifier.EqualsVerifier; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.junit.runner.RunWith; @@ -110,4 +111,9 @@ public class RelationshipListTest { assertTrue(relationshipList1.equals(relationshipList)); assertTrue(StringUtils.isNotBlank(relationshipList.toString())); } + @Test + public void equalsContract() { + EqualsVerifier.simple().forClass(RelationshipList.class) + .verify(); + } } diff --git a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/RelationshipTest.java b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/RelationshipTest.java index 3bd563bc..764671a8 100644 --- a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/RelationshipTest.java +++ b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/RelationshipTest.java @@ -24,6 +24,7 @@ package org.onap.slice.analysis.ms.models.aai; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.JsonArray; +import nl.jqno.equalsverifier.EqualsVerifier; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.junit.runner.RunWith; @@ -97,4 +98,10 @@ public class RelationshipTest { assertTrue(StringUtils.isNotBlank(relationship1.toString())); } + + @Test + public void equalsContract() { + EqualsVerifier.simple().forClass(Relationship.class) + .verify(); + } } diff --git a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/ServiceInstanceTest.java b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/ServiceInstanceTest.java index 3a550168..8f275905 100644 --- a/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/ServiceInstanceTest.java +++ b/components/slice-analysis-ms/src/test/java/org/onap/slice/analysis/ms/models/aai/ServiceInstanceTest.java @@ -21,6 +21,7 @@ package org.onap.slice.analysis.ms.models.aai; +import nl.jqno.equalsverifier.EqualsVerifier; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.junit.runner.RunWith; @@ -101,4 +102,10 @@ public class ServiceInstanceTest { assertTrue(serviceInstance1.equals(serviceInstance)); assertTrue(StringUtils.isNotBlank(serviceInstance.toString())); } + + @Test + public void equalsContract() { + EqualsVerifier.simple().forClass(ServiceInstance.class) + .verify(); + } } |