e4203baef8da5425da01b633349f6e9043f61560
[so.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
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 package org.openecomp.mso.adapters.tenant;
21
22 import org.junit.Test;
23 import org.openecomp.mso.adapters.tenantrest.CreateTenantRequest;
24 import org.openecomp.mso.adapters.tenantrest.DeleteTenantRequest;
25 import org.openecomp.mso.adapters.tenantrest.RollbackTenantRequest;
26
27 public class TenantAdapterRestTest {
28
29     // TODO: following test case is done for coverage
30     // later it should be modified for proper test.
31     
32     TenantAdapterRest tenantAdapterRest = new TenantAdapterRest();
33
34     @Test(expected = ClassFormatError.class)
35     public void healthcheck() throws Exception {
36         tenantAdapterRest.healthcheck();
37     }
38
39     @Test(expected = ClassFormatError.class)
40     public void createTenant() throws Exception {
41         tenantAdapterRest.createTenant(new CreateTenantRequest());
42     }
43
44     @Test(expected = ClassFormatError.class)
45     public void deleteTenant() throws Exception {
46         tenantAdapterRest.deleteTenant("test", new DeleteTenantRequest());
47     }
48
49     @Test(expected = ClassFormatError.class)
50     public void queryTenant() throws Exception {
51         tenantAdapterRest.queryTenant("test", "test", "requestid", "serviceInstanceId");
52     }
53
54     @Test(expected = ClassFormatError.class)
55     public void rollbackTenant() throws Exception {
56         tenantAdapterRest.rollbackTenant("action", new RollbackTenantRequest());
57     }
58
59 }