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.Ignore;
24 import org.junit.Test;
25 import org.openecomp.sdc.be.components.distribution.engine.INotificationData;
26 import org.openecomp.sdc.be.dao.api.ActionStatus;
27 import org.openecomp.sdc.be.model.Service;
28 import org.openecomp.sdc.be.model.User;
29 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
30 import org.openecomp.sdc.be.resources.data.OperationalEnvironmentEntry;
32 @Ignore ("This class does not test anything, there is not a single assertion and the code with reflection fails")
33 public class DistributionEngineMockTest {
35 private DistributionEngineMock createTestSubject() {
36 return new DistributionEngineMock();
40 public void testIsActive() throws Exception {
41 DistributionEngineMock testSubject;
45 testSubject = createTestSubject();
46 result = testSubject.isActive();
50 public void testNotifyService() throws Exception {
51 DistributionEngineMock testSubject;
52 String distributionId = "";
53 Service service = null;
54 INotificationData notificationData = null;
58 User modifierName=new User();
61 testSubject = createTestSubject();
62 result = testSubject.notifyService(distributionId, service, notificationData, envName, userId, modifierName);
66 public void testNotifyService_1() throws Exception {
67 DistributionEngineMock testSubject;
68 String distributionId = "";
69 Service service = null;
70 INotificationData notificationData = null;
74 User modifierName = new User();
78 testSubject = createTestSubject();
79 result = testSubject.notifyService(distributionId, service, notificationData, envId, envName,
84 public void testIsEnvironmentAvailable() throws Exception {
85 DistributionEngineMock testSubject;
87 StorageOperationStatus result;
90 testSubject = createTestSubject();
91 result = testSubject.isEnvironmentAvailable(envName);
95 public void testIsEnvironmentAvailable_1() throws Exception {
96 DistributionEngineMock testSubject;
97 StorageOperationStatus result;
100 testSubject = createTestSubject();
101 result = testSubject.isEnvironmentAvailable();
105 public void testDisableEnvironment() throws Exception {
106 DistributionEngineMock testSubject;
110 testSubject = createTestSubject();
111 testSubject.disableEnvironment(envName);
116 public void testIsReadyForDistribution() throws Exception {
117 DistributionEngineMock testSubject;
118 Service service = null;
120 StorageOperationStatus result;
123 testSubject = createTestSubject();
124 result = testSubject.isReadyForDistribution(envName);
128 public void testBuildServiceForDistribution() throws Exception {
129 DistributionEngineMock testSubject;
130 Service service = null;
131 String distributionId = "";
132 String workloadContext = "";
133 INotificationData result;
136 testSubject = createTestSubject();
137 result = testSubject.buildServiceForDistribution(service, distributionId, workloadContext);
141 public void testGetEnvironmentById() throws Exception {
142 DistributionEngineMock testSubject;
144 OperationalEnvironmentEntry result;
147 testSubject = createTestSubject();
148 result = testSubject.getEnvironmentById(opEnvId);