3ea025a9dd754e50b8bbde8377f2ecfd481ca53b
[aaf/authz.git] / authz-fs / src / test / java / com / att / authz / fs / JU_FileServer.java
1 /*******************************************************************************\r
2  * ============LICENSE_START====================================================\r
3  * * org.onap.aai\r
4  * * ===========================================================================\r
5  * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
6  * * Copyright © 2017 Amdocs\r
7  * * ===========================================================================\r
8  * * Licensed under the Apache License, Version 2.0 (the "License");\r
9  * * you may not use this file except in compliance with the License.\r
10  * * You may obtain a copy of the License at\r
11  * * \r
12  *  *      http://www.apache.org/licenses/LICENSE-2.0\r
13  * * \r
14  *  * Unless required by applicable law or agreed to in writing, software\r
15  * * distributed under the License is distributed on an "AS IS" BASIS,\r
16  * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
17  * * See the License for the specific language governing permissions and\r
18  * * limitations under the License.\r
19  * * ============LICENSE_END====================================================\r
20  * *\r
21  * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
22  * *\r
23  ******************************************************************************/\r
24 package com.att.authz.fs;\r
25 \r
26 import static com.att.cssa.rserv.HttpMethods.GET;\r
27 import static org.junit.Assert.*;\r
28 \r
29 import java.io.File;\r
30 import java.io.IOException;\r
31 import java.net.URL;\r
32 import java.util.Properties;\r
33 \r
34 import org.junit.Before;\r
35 import org.junit.Test;\r
36 import org.junit.runner.RunWith;\r
37 import org.mockito.InjectMocks;\r
38 import org.mockito.Matchers;\r
39 import org.mockito.Mock;\r
40 import org.mockito.Mockito;\r
41 import org.mockito.runners.MockitoJUnitRunner;\r
42 import org.powermock.api.mockito.PowerMockito;\r
43 import org.powermock.modules.junit4.PowerMockRunner;\r
44 \r
45 import com.att.authz.env.AuthzEnv;\r
46 import com.att.authz.env.AuthzTrans;\r
47 import com.att.cssa.rserv.CachingFileAccess;\r
48 import com.att.inno.env.APIException;\r
49 import com.att.authz.fs.*;\r
50 \r
51 @RunWith(MockitoJUnitRunner.class)\r
52 public class JU_FileServer {    \r
53         @Mock\r
54         AuthzEnv authzEnvMock;\r
55         AuthzEnv authzEnv = new AuthzEnv();\r
56         \r
57         @Before\r
58         public void setUp() throws APIException, IOException{\r
59 \r
60         }\r
61         \r
62         @SuppressWarnings("static-access")\r
63         @Test\r
64         public void testMain() throws Exception{\r
65                 \r
66                 String[] args = null;\r
67                 Properties props = new Properties();\r
68                 ClassLoader classLoader = getClass().getClassLoader();\r
69                 File file = new File(classLoader.getResource("FileServer.props").getFile());\r
70 \r
71 //PowerMockito.whenNew(Something.class).withArguments(argument).thenReturn(mockSomething);\r
72                 //                      env.setLog4JNames("log4j.properties","authz","fs","audit","init",null);\r
73     // PowerMockito.whenNew(AuthzEnv.class).withArguments(props).thenReturn(authzEnvMock);\r
74    //  PowerMockito.doNothing().when(authzEnvMock.setLog4JNames(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString()));\r
75   // PowerMockito.when(new AuthzEnv(props)).thenReturn(authzEnvMock);\r
76                 //PowerMockito.doNothing().when(authzEnv).setLog4JNames(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString());\r
77         //PowerMockito.doNothing().when(authzEnvMock).setLog4JNames(" "," "," "," "," "," ");\r
78 \r
79                 FileServer.main(args);\r
80                 //assertTrue(true);\r
81                 \r
82         }\r
83         \r
84 }\r