2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.asdctool.migration.config.mocks;
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;
33 @Ignore("This class does not test anything, there is not a single assertion and the code with reflection fails")
34 public class DistributionEngineMockTest {
36 private DistributionEngineMock createTestSubject() {
37 return new DistributionEngineMock();
41 public void testIsActive() throws Exception {
42 DistributionEngineMock testSubject;
46 testSubject = createTestSubject();
47 result = testSubject.isActive();
48 Assert.assertNotNull(result);
52 public void testNotifyService() throws Exception {
53 DistributionEngineMock testSubject;
54 String distributionId = "";
55 Service service = null;
56 INotificationData notificationData = null;
60 User modifierName = new User();
63 testSubject = createTestSubject();
64 result = testSubject.notifyService(distributionId, service, notificationData, envName, userId, modifierName);
65 Assert.assertNotNull(result);
69 public void testNotifyService_1() throws Exception {
70 DistributionEngineMock testSubject;
71 String distributionId = "";
72 Service service = null;
73 INotificationData notificationData = null;
77 User modifierName = new User();
81 testSubject = createTestSubject();
82 result = testSubject.notifyService(distributionId, service, notificationData, envId, envName,
84 Assert.assertNotNull(result);
88 public void testIsEnvironmentAvailable() throws Exception {
89 DistributionEngineMock testSubject;
91 StorageOperationStatus result;
94 testSubject = createTestSubject();
95 result = testSubject.isEnvironmentAvailable(envName);
96 Assert.assertNotNull(result);
100 public void testIsEnvironmentAvailable_1() throws Exception {
101 DistributionEngineMock testSubject;
102 StorageOperationStatus result;
105 testSubject = createTestSubject();
106 result = testSubject.isEnvironmentAvailable();
107 Assert.assertNotNull(result);
111 public void testDisableEnvironment() throws Exception {
112 DistributionEngineMock testSubject;
116 testSubject = createTestSubject();
117 testSubject.disableEnvironment(envName);
121 public void testIsReadyForDistribution() throws Exception {
122 DistributionEngineMock testSubject;
123 Service service = null;
125 StorageOperationStatus result;
128 testSubject = createTestSubject();
129 result = testSubject.isReadyForDistribution(envName);
130 Assert.assertNotNull(result);
134 public void testBuildServiceForDistribution() throws Exception {
135 DistributionEngineMock testSubject;
136 Service service = null;
137 String distributionId = "";
138 String workloadContext = "";
139 INotificationData result;
142 testSubject = createTestSubject();
143 result = testSubject.buildServiceForDistribution(service, distributionId, workloadContext);
144 Assert.assertNotNull(result);
148 public void testGetEnvironmentById() throws Exception {
149 DistributionEngineMock testSubject;
151 OperationalEnvironmentEntry result;
154 testSubject = createTestSubject();
155 result = testSubject.getEnvironmentById(opEnvId);
156 Assert.assertNotNull(result);