Increase junit TCs
[sdc.git] / asdctool / src / test / java / org / openecomp / sdc / asdctool / migration / config / mocks / DistributionEngineMockTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.asdctool.migration.config.mocks;
22
23 import org.junit.Assert;
24 import org.junit.Ignore;
25 import org.junit.Test;
26 import org.openecomp.sdc.be.components.distribution.engine.INotificationData;
27 import org.openecomp.sdc.be.dao.api.ActionStatus;
28 import org.openecomp.sdc.be.model.Service;
29 import org.openecomp.sdc.be.model.User;
30 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
31 import org.openecomp.sdc.be.resources.data.OperationalEnvironmentEntry;
32
33 @Ignore("This class does not test anything, there is not a single assertion and the code with reflection fails")
34 public class DistributionEngineMockTest {
35
36     private DistributionEngineMock createTestSubject() {
37         return new DistributionEngineMock();
38     }
39
40     @Test
41     public void testIsActive() throws Exception {
42         DistributionEngineMock testSubject;
43         boolean result;
44
45         // default test
46         testSubject = createTestSubject();
47         result = testSubject.isActive();
48         Assert.assertNotNull(result);
49     }
50
51     @Test
52     public void testNotifyService() throws Exception {
53         DistributionEngineMock testSubject;
54         String distributionId = "";
55         Service service = null;
56         INotificationData notificationData = null;
57         String envName = "";
58         String userId = "";
59         ActionStatus result;
60         User modifierName = new User();
61
62         // default test
63         testSubject = createTestSubject();
64         result = testSubject.notifyService(distributionId, service, notificationData, envName, userId, modifierName);
65         Assert.assertNotNull(result);
66     }
67
68     @Test
69     public void testNotifyService_1() throws Exception {
70         DistributionEngineMock testSubject;
71         String distributionId = "";
72         Service service = null;
73         INotificationData notificationData = null;
74         String envId = "";
75         String envName = "";
76         String userId = "";
77         User modifierName = new User();
78         ActionStatus result;
79
80         // default test
81         testSubject = createTestSubject();
82         result = testSubject.notifyService(distributionId, service, notificationData, envId, envName,
83             modifierName);
84         Assert.assertNotNull(result);
85     }
86
87     @Test
88     public void testIsEnvironmentAvailable() throws Exception {
89         DistributionEngineMock testSubject;
90         String envName = "";
91         StorageOperationStatus result;
92
93         // default test
94         testSubject = createTestSubject();
95         result = testSubject.isEnvironmentAvailable(envName);
96         Assert.assertNotNull(result);
97     }
98
99     @Test
100     public void testIsEnvironmentAvailable_1() throws Exception {
101         DistributionEngineMock testSubject;
102         StorageOperationStatus result;
103
104         // default test
105         testSubject = createTestSubject();
106         result = testSubject.isEnvironmentAvailable();
107         Assert.assertNotNull(result);
108     }
109
110     @Test
111     public void testDisableEnvironment() throws Exception {
112         DistributionEngineMock testSubject;
113         String envName = "";
114
115         // default test
116         testSubject = createTestSubject();
117         testSubject.disableEnvironment(envName);
118     }
119
120     @Test
121     public void testIsReadyForDistribution() throws Exception {
122         DistributionEngineMock testSubject;
123         Service service = null;
124         String envName = "";
125         StorageOperationStatus result;
126
127         // default test
128         testSubject = createTestSubject();
129         result = testSubject.isReadyForDistribution(envName);
130         Assert.assertNotNull(result);
131     }
132
133     @Test
134     public void testBuildServiceForDistribution() throws Exception {
135         DistributionEngineMock testSubject;
136         Service service = null;
137         String distributionId = "";
138         String workloadContext = "";
139         INotificationData result;
140
141         // default test
142         testSubject = createTestSubject();
143         result = testSubject.buildServiceForDistribution(service, distributionId, workloadContext);
144         Assert.assertNotNull(result);
145     }
146
147     @Test
148     public void testGetEnvironmentById() throws Exception {
149         DistributionEngineMock testSubject;
150         String opEnvId = "";
151         OperationalEnvironmentEntry result;
152
153         // default test
154         testSubject = createTestSubject();
155         result = testSubject.getEnvironmentById(opEnvId);
156         Assert.assertNotNull(result);
157     }
158 }