[SDC-29] rebase continue work to align source
[sdc.git] / test-apis-ci / src / main / java / org / openecomp / sdc / ci / tests / execute / general / FeProxyTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 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.ci.tests.execute.general;
22
23 import org.junit.Rule;
24 import org.junit.rules.TestName;
25 import org.openecomp.sdc.be.model.User;
26 import org.openecomp.sdc.ci.tests.api.ComponentBaseTest;
27 import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum;
28 import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse;
29 import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
30 import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils;
31 import org.openecomp.sdc.ci.tests.utils.rest.CategoryRestUtils;
32 import org.testng.AssertJUnit;
33 import org.testng.annotations.Test;
34
35 public class FeProxyTest extends ComponentBaseTest {
36
37         @Rule
38         public static TestName name = new TestName();
39
40         public FeProxyTest() {
41                 super(name, FeProxyTest.class.getName());
42         }
43
44         @Test
45         public void testFeProxy() throws Exception {
46                 User defaultUser = ElementFactory.getDefaultUser(UserRoleEnum.ADMIN);
47                 RestResponse allCategoriesTowardsFe = CategoryRestUtils.getAllCategoriesTowardsFe(defaultUser,
48                                 BaseRestUtils.RESOURCE_COMPONENT_TYPE);
49                 AssertJUnit.assertEquals("Check response code after get categories towards FE", 200,
50                                 allCategoriesTowardsFe.getErrorCode().intValue());
51         }
52
53 }