2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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=========================================================
20 package org.onap.so.adapters.tenant;
22 import java.util.HashMap;
23 import javax.xml.ws.Holder;
24 import org.junit.Test;
25 import org.junit.runner.RunWith;
26 import org.mockito.InjectMocks;
27 import org.mockito.Mock;
28 import org.mockito.Spy;
29 import org.mockito.junit.MockitoJUnitRunner;
30 import org.onap.so.adapters.tenantrest.TenantRollback;
31 import org.onap.so.cloud.CloudConfig;
32 import org.onap.so.entity.MsoRequest;
34 @RunWith(MockitoJUnitRunner.class)
35 public class MsoTenantAdapterImplTest {
38 private CloudConfig cloudConfig;
42 private MsoTenantAdapterImpl msoTenantAdapter;
45 public void healthCheck() throws Exception {
46 msoTenantAdapter.healthCheck();
49 @Test(expected = NullPointerException.class)
50 public void createTenant() throws Exception {
51 msoTenantAdapter.createTenant("site", "tenant", new HashMap<>(), true, true, new MsoRequest(),
52 new Holder<String>(), new Holder<TenantRollback>());
55 @Test(expected = NullPointerException.class)
56 public void queryTenant() throws Exception {
57 msoTenantAdapter.queryTenant("site", "tenant", new MsoRequest(), new Holder<>(), new Holder<>(),
61 @Test(expected = NullPointerException.class)
62 public void deleteTenant() throws Exception {
63 msoTenantAdapter.deleteTenant("cloud", "tenant", new MsoRequest(), new Holder<Boolean>());
67 public void rollbackTenant() throws Exception {
68 msoTenantAdapter.rollbackTenant(new TenantRollback());