aboutsummaryrefslogtreecommitdiffstats
path: root/asdctool
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2019-10-15 10:23:08 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-01-26 09:17:08 +0000
commitcb7a00bf89efca5b784120e990f79c475347e89d (patch)
tree2e434c227f7ac2bf3ba024f9496ded1f399554b9 /asdctool
parentc113cc3f10f72013a66c2eb5a52ab8460da196f9 (diff)
Increase junit TCs
1. Re-enable disabled TCs (enable = true) 2. Enable @Ignored TCs 3. Add some Assert when missing 4. Remove old unused TCs (covered in UI) Change-Id: I900e52f4860b1fdc5bd1e529a1fe7f5c3491465b Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2672
Diffstat (limited to 'asdctool')
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/mocks/DistributionEngineMockTest.java244
1 files changed, 126 insertions, 118 deletions
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/mocks/DistributionEngineMockTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/mocks/DistributionEngineMockTest.java
index ec63f90491..4c6f4482fe 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/mocks/DistributionEngineMockTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/mocks/DistributionEngineMockTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -20,6 +20,7 @@
package org.openecomp.sdc.asdctool.migration.config.mocks;
+import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.openecomp.sdc.be.components.distribution.engine.INotificationData;
@@ -29,122 +30,129 @@ import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
import org.openecomp.sdc.be.resources.data.OperationalEnvironmentEntry;
-@Ignore ("This class does not test anything, there is not a single assertion and the code with reflection fails")
+@Ignore("This class does not test anything, there is not a single assertion and the code with reflection fails")
public class DistributionEngineMockTest {
- private DistributionEngineMock createTestSubject() {
- return new DistributionEngineMock();
- }
-
- @Test
- public void testIsActive() throws Exception {
- DistributionEngineMock testSubject;
- boolean result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.isActive();
- }
-
- @Test
- public void testNotifyService() throws Exception {
- DistributionEngineMock testSubject;
- String distributionId = "";
- Service service = null;
- INotificationData notificationData = null;
- String envName = "";
- String userId = "";
- ActionStatus result;
- User modifierName=new User();
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.notifyService(distributionId, service, notificationData, envName, userId, modifierName);
- }
-
- @Test
- public void testNotifyService_1() throws Exception {
- DistributionEngineMock testSubject;
- String distributionId = "";
- Service service = null;
- INotificationData notificationData = null;
- String envId = "";
- String envName = "";
- String userId = "";
- User modifierName = new User();
- ActionStatus result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.notifyService(distributionId, service, notificationData, envId, envName,
- modifierName);
- }
-
- @Test
- public void testIsEnvironmentAvailable() throws Exception {
- DistributionEngineMock testSubject;
- String envName = "";
- StorageOperationStatus result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.isEnvironmentAvailable(envName);
- }
-
- @Test
- public void testIsEnvironmentAvailable_1() throws Exception {
- DistributionEngineMock testSubject;
- StorageOperationStatus result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.isEnvironmentAvailable();
- }
-
- @Test
- public void testDisableEnvironment() throws Exception {
- DistributionEngineMock testSubject;
- String envName = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.disableEnvironment(envName);
- }
-
- @Ignore
- @Test
- public void testIsReadyForDistribution() throws Exception {
- DistributionEngineMock testSubject;
- Service service = null;
- String envName = "";
- StorageOperationStatus result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.isReadyForDistribution(envName);
- }
-
- @Test
- public void testBuildServiceForDistribution() throws Exception {
- DistributionEngineMock testSubject;
- Service service = null;
- String distributionId = "";
- String workloadContext = "";
- INotificationData result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.buildServiceForDistribution(service, distributionId, workloadContext);
- }
-
- @Test
- public void testGetEnvironmentById() throws Exception {
- DistributionEngineMock testSubject;
- String opEnvId = "";
- OperationalEnvironmentEntry result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getEnvironmentById(opEnvId);
- }
+ private DistributionEngineMock createTestSubject() {
+ return new DistributionEngineMock();
+ }
+
+ @Test
+ public void testIsActive() throws Exception {
+ DistributionEngineMock testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isActive();
+ Assert.assertNotNull(result);
+ }
+
+ @Test
+ public void testNotifyService() throws Exception {
+ DistributionEngineMock testSubject;
+ String distributionId = "";
+ Service service = null;
+ INotificationData notificationData = null;
+ String envName = "";
+ String userId = "";
+ ActionStatus result;
+ User modifierName = new User();
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.notifyService(distributionId, service, notificationData, envName, userId, modifierName);
+ Assert.assertNotNull(result);
+ }
+
+ @Test
+ public void testNotifyService_1() throws Exception {
+ DistributionEngineMock testSubject;
+ String distributionId = "";
+ Service service = null;
+ INotificationData notificationData = null;
+ String envId = "";
+ String envName = "";
+ String userId = "";
+ User modifierName = new User();
+ ActionStatus result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.notifyService(distributionId, service, notificationData, envId, envName,
+ modifierName);
+ Assert.assertNotNull(result);
+ }
+
+ @Test
+ public void testIsEnvironmentAvailable() throws Exception {
+ DistributionEngineMock testSubject;
+ String envName = "";
+ StorageOperationStatus result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isEnvironmentAvailable(envName);
+ Assert.assertNotNull(result);
+ }
+
+ @Test
+ public void testIsEnvironmentAvailable_1() throws Exception {
+ DistributionEngineMock testSubject;
+ StorageOperationStatus result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isEnvironmentAvailable();
+ Assert.assertNotNull(result);
+ }
+
+ @Test
+ public void testDisableEnvironment() throws Exception {
+ DistributionEngineMock testSubject;
+ String envName = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.disableEnvironment(envName);
+ }
+
+ @Test
+ public void testIsReadyForDistribution() throws Exception {
+ DistributionEngineMock testSubject;
+ Service service = null;
+ String envName = "";
+ StorageOperationStatus result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isReadyForDistribution(envName);
+ Assert.assertNotNull(result);
+ }
+
+ @Test
+ public void testBuildServiceForDistribution() throws Exception {
+ DistributionEngineMock testSubject;
+ Service service = null;
+ String distributionId = "";
+ String workloadContext = "";
+ INotificationData result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.buildServiceForDistribution(service, distributionId, workloadContext);
+ Assert.assertNotNull(result);
+ }
+
+ @Test
+ public void testGetEnvironmentById() throws Exception {
+ DistributionEngineMock testSubject;
+ String opEnvId = "";
+ OperationalEnvironmentEntry result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getEnvironmentById(opEnvId);
+ Assert.assertNotNull(result);
+ }
}