summaryrefslogtreecommitdiffstats
path: root/authz-fs/src/test
diff options
context:
space:
mode:
authorsg481n <sg481n@att.com>2017-08-28 12:11:35 -0400
committersg481n <sg481n@att.com>2017-08-28 12:11:47 -0400
commitbd890c575163e4d87ac24198b9c68a39cf4bbc4d (patch)
tree2d6c5baa66d1df8f8c841d39646e93020ed203bc /authz-fs/src/test
parent72b21f2ac109b0d95fef3ef608c0c343337d4ce2 (diff)
Update project structure to org.onap.aaf
Update project structure of authz module in aaf from com.att to org.onap.aaf and add distribution management and repositories. Issue-id: AAF-21 Change-Id: Ia2486954e99f2bd60f18122ed60d32d5590781e9 Signed-off-by: sg481n <sg481n@att.com>
Diffstat (limited to 'authz-fs/src/test')
-rw-r--r--authz-fs/src/test/java/org/onap/aaf/authz/fs/JU_FileServer.java83
1 files changed, 83 insertions, 0 deletions
diff --git a/authz-fs/src/test/java/org/onap/aaf/authz/fs/JU_FileServer.java b/authz-fs/src/test/java/org/onap/aaf/authz/fs/JU_FileServer.java
new file mode 100644
index 00000000..88858e7b
--- /dev/null
+++ b/authz-fs/src/test/java/org/onap/aaf/authz/fs/JU_FileServer.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aaf
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * ===========================================================================
+ * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * you may not use this file except in compliance with the License.
+ * * You may obtain a copy of the License at
+ * *
+ * * http://www.apache.org/licenses/LICENSE-2.0
+ * *
+ * * Unless required by applicable law or agreed to in writing, software
+ * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * See the License for the specific language governing permissions and
+ * * limitations under the License.
+ * * ============LICENSE_END====================================================
+ * *
+ * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * *
+ ******************************************************************************/
+package org.onap.aaf.authz.fs;
+
+import static org.junit.Assert.*;
+import static org.onap.aaf.cssa.rserv.HttpMethods.GET;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.aaf.authz.env.AuthzEnv;
+import org.onap.aaf.authz.env.AuthzTrans;
+import org.onap.aaf.authz.fs.*;
+import org.onap.aaf.cssa.rserv.CachingFileAccess;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import org.onap.aaf.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_FileServer {
+ @Mock
+ AuthzEnv authzEnvMock;
+ AuthzEnv authzEnv = new AuthzEnv();
+
+ @Before
+ public void setUp() throws APIException, IOException{
+
+ }
+
+ @SuppressWarnings("static-access")
+ @Test
+ public void testMain() throws Exception{
+
+ String[] args = null;
+ Properties props = new Properties();
+ ClassLoader classLoader = getClass().getClassLoader();
+ File file = new File(classLoader.getResource("FileServer.props").getFile());
+
+//PowerMockito.whenNew(Something.class).withArguments(argument).thenReturn(mockSomething);
+ // env.setLog4JNames("log4j.properties","authz","fs","audit","init",null);
+ // PowerMockito.whenNew(AuthzEnv.class).withArguments(props).thenReturn(authzEnvMock);
+ // PowerMockito.doNothing().when(authzEnvMock.setLog4JNames(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString()));
+ // PowerMockito.when(new AuthzEnv(props)).thenReturn(authzEnvMock);
+ //PowerMockito.doNothing().when(authzEnv).setLog4JNames(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.anyString());
+ //PowerMockito.doNothing().when(authzEnvMock).setLog4JNames(" "," "," "," "," "," ");
+
+ FileServer.main(args);
+ //assertTrue(true);
+
+ }
+
+}