Improve test coverage 33/119933/2
authorvasraz <vasyl.razinkov@est.tech>
Sat, 27 Mar 2021 00:25:53 +0000 (00:25 +0000)
committerChristophe Closset <christophe.closset@intl.att.com>
Mon, 29 Mar 2021 07:03:51 +0000 (07:03 +0000)
Fix test directory structure

Change-Id: Iabd6c06424f1a58bd311da4b071853a05e2816f1
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-3428

openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/test/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntityTest.java [moved from openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/test/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntityTest.java with 91% similarity]
openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/test/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntityTest.java [moved from openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/test/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntityTest.java with 91% similarity]
openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/test/java/org/openecomp/core/model/types/ServiceArtifactEntityTest.java [moved from openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/test/java/org/openecomp/core/model/types/ServiceArtifactEntityTest.java with 91% similarity]
openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/test/java/org/openecomp/core/model/types/ServiceTemplateEntityTest.java [moved from openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/test/java/org/openecomp/core/model/types/ServiceTemplateEntityTest.java with 91% similarity]

@@ -34,8 +34,7 @@ import org.junit.jupiter.api.Test;
 import org.openecomp.sdc.common.errors.SdcRuntimeException;
 import org.openecomp.sdc.versioning.dao.types.Version;
 
-
-public class EnrichedServiceArtifactEntityTest {
+class EnrichedServiceArtifactEntityTest {
 
     private static final byte[] BYTE_ARRAY = new byte[]{0xA, 0xB, 0xC, 0xD};
 
@@ -49,21 +48,21 @@ public class EnrichedServiceArtifactEntityTest {
     }
 
     @Test
-    public void shouldReturnNonEmptyEntityType() {
+    void shouldReturnNonEmptyEntityType() {
         EnrichedServiceArtifactEntity entity =
             new EnrichedServiceArtifactEntity();
         assertTrue(StringUtils.isNoneEmpty(entity.getEntityType()));
     }
 
     @Test
-    public void shouldHaveFirstClassCitizenIdEqualToVspId() {
+    void shouldHaveFirstClassCitizenIdEqualToVspId() {
         EnrichedServiceArtifactEntity entity =
             new EnrichedServiceArtifactEntity(createServiceArtifact());
         assertEquals(entity.getId(), entity.getFirstClassCitizenId());
     }
 
     @Test
-    public void serviceArtifactGetterShouldReturnCorrectData() throws IOException {
+    void serviceArtifactGetterShouldReturnCorrectData() throws IOException {
         ServiceArtifact serviceArtifact = createServiceArtifact();
         EnrichedServiceArtifactEntity entity =
             new EnrichedServiceArtifactEntity(serviceArtifact);
@@ -77,7 +76,7 @@ public class EnrichedServiceArtifactEntityTest {
     }
 
     @Test
-    public void shouldFailOnNullContentBytesSupplied() {
+    void shouldFailOnNullContentBytesSupplied() {
         ServiceArtifact serviceArtifactMock = mock(ServiceArtifact.class);
         given(serviceArtifactMock.getContent()).willAnswer(invocation -> {
             throw new IOException("Test exception");
@@ -34,8 +34,7 @@ import org.junit.jupiter.api.Test;
 import org.openecomp.sdc.common.errors.SdcRuntimeException;
 import org.openecomp.sdc.versioning.dao.types.Version;
 
-
-public class EnrichedServiceTemplateEntityTest {
+class EnrichedServiceTemplateEntityTest {
 
     private static final byte[] BYTE_ARRAY = new byte[]{0xA, 0xB, 0xC, 0xD};
 
@@ -49,21 +48,21 @@ public class EnrichedServiceTemplateEntityTest {
     }
 
     @Test
-    public void shouldReturnNonEmptyEntityType() {
+    void shouldReturnNonEmptyEntityType() {
         EnrichedServiceTemplateEntity entity =
             new EnrichedServiceTemplateEntity();
         assertTrue(StringUtils.isNoneEmpty(entity.getEntityType()));
     }
 
     @Test
-    public void shouldHaveFirstClassCitizenIdEqualToVspId() {
+    void shouldHaveFirstClassCitizenIdEqualToVspId() {
         EnrichedServiceTemplateEntity entity =
             new EnrichedServiceTemplateEntity(createServiceTemplate());
         assertEquals(entity.getId(), entity.getFirstClassCitizenId());
     }
 
     @Test
-    public void serviceTemplateGetterShouldReturnCorrectData() throws IOException {
+    void serviceTemplateGetterShouldReturnCorrectData() throws IOException {
         ServiceTemplate serviceTemplate = createServiceTemplate();
         EnrichedServiceTemplateEntity entity =
             new EnrichedServiceTemplateEntity(serviceTemplate);
@@ -77,7 +76,7 @@ public class EnrichedServiceTemplateEntityTest {
     }
 
     @Test
-    public void shouldFailOnNullContentBytesSupplied() {
+    void shouldFailOnNullContentBytesSupplied() {
         ServiceTemplate serviceTemplateMock = mock(ServiceTemplate.class);
         given(serviceTemplateMock.getContent()).willAnswer(invocation -> {
             throw new IOException("Test exception");
@@ -34,8 +34,7 @@ import org.junit.jupiter.api.Test;
 import org.openecomp.sdc.common.errors.SdcRuntimeException;
 import org.openecomp.sdc.versioning.dao.types.Version;
 
-
-public class ServiceArtifactEntityTest {
+class ServiceArtifactEntityTest {
 
     private static final byte[] BYTE_ARRAY = new byte[]{0xA, 0xB, 0xC, 0xD};
 
@@ -49,21 +48,21 @@ public class ServiceArtifactEntityTest {
     }
 
     @Test
-    public void shouldReturnNonEmptyEntityType() {
+    void shouldReturnNonEmptyEntityType() {
         ServiceArtifactEntity entity =
             new ServiceArtifactEntity();
         assertTrue(StringUtils.isNoneEmpty(entity.getEntityType()));
     }
 
     @Test
-    public void shouldHaveFirstClassCitizenIdEqualToVspId() {
+    void shouldHaveFirstClassCitizenIdEqualToVspId() {
         ServiceArtifactEntity entity =
             new ServiceArtifactEntity(createServiceArtifact());
         assertEquals(entity.getId(), entity.getFirstClassCitizenId());
     }
 
     @Test
-    public void serviceArtifactGetterShouldReturnCorrectData() throws IOException {
+    void serviceArtifactGetterShouldReturnCorrectData() throws IOException {
         ServiceArtifact serviceArtifact = createServiceArtifact();
         ServiceArtifactEntity entity =
             new ServiceArtifactEntity(serviceArtifact);
@@ -77,7 +76,7 @@ public class ServiceArtifactEntityTest {
     }
 
     @Test
-    public void shouldFailOnNullContentBytesSupplied() {
+    void shouldFailOnNullContentBytesSupplied() {
         ServiceArtifact serviceArtifactMock = mock(ServiceArtifact.class);
         given(serviceArtifactMock.getContent()).willAnswer(invocation -> {
             throw new IOException("Test exception");
@@ -34,8 +34,7 @@ import org.junit.jupiter.api.Test;
 import org.openecomp.sdc.common.errors.SdcRuntimeException;
 import org.openecomp.sdc.versioning.dao.types.Version;
 
-
-public class ServiceTemplateEntityTest {
+class ServiceTemplateEntityTest {
 
     private static final byte[] BYTE_ARRAY = new byte[]{0xA, 0xB, 0xC, 0xD};
 
@@ -49,21 +48,21 @@ public class ServiceTemplateEntityTest {
     }
 
     @Test
-    public void shouldReturnNonEmptyEntityType() {
+    void shouldReturnNonEmptyEntityType() {
         ServiceTemplateEntity entity =
             new ServiceTemplateEntity();
         assertTrue(StringUtils.isNoneEmpty(entity.getEntityType()));
     }
 
     @Test
-    public void shouldHaveFirstClassCitizenIdEqualToVspId() {
+    void shouldHaveFirstClassCitizenIdEqualToVspId() {
         ServiceTemplateEntity entity =
             new ServiceTemplateEntity(createServiceTemplate());
         assertEquals(entity.getId(), entity.getFirstClassCitizenId());
     }
 
     @Test
-    public void serviceTemplateGetterShouldReturnCorrectData() throws IOException {
+    void serviceTemplateGetterShouldReturnCorrectData() throws IOException {
         ServiceTemplate serviceTemplate = createServiceTemplate();
         ServiceTemplateEntity entity =
             new ServiceTemplateEntity(serviceTemplate);
@@ -77,7 +76,7 @@ public class ServiceTemplateEntityTest {
     }
 
     @Test
-    public void shouldFailOnNullContentBytesSupplied() {
+    void shouldFailOnNullContentBytesSupplied() {
         ServiceTemplate serviceTemplateMock = mock(ServiceTemplate.class);
         given(serviceTemplateMock.getContent()).willAnswer(invocation -> {
             throw new IOException("Test exception");