summaryrefslogtreecommitdiffstats
path: root/auth/auth-batch
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-batch')
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_Batch.java92
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchException.java59
2 files changed, 151 insertions, 0 deletions
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_Batch.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_Batch.java
new file mode 100644
index 00000000..752b98b7
--- /dev/null
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_Batch.java
@@ -0,0 +1,92 @@
+/**
+ * ============LICENSE_START====================================================
+ * org.onap.aaf
+ * ===========================================================================
+ * Copyright (c) 2018 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====================================================
+ *
+ */
+
+package org.onap.aaf.auth.test;
+
+import static org.junit.Assert.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.onap.aaf.auth.Batch;
+import org.onap.aaf.auth.env.AuthzEnv;
+import org.onap.aaf.auth.env.AuthzTrans;
+import org.onap.aaf.auth.org.Organization;
+import org.onap.aaf.auth.org.OrganizationException;
+import org.onap.aaf.auth.org.OrganizationFactory;
+import org.onap.aaf.cadi.client.Future;
+import org.onap.aaf.cadi.client.Rcli;
+import org.onap.aaf.cadi.config.Config;
+import org.onap.aaf.misc.env.APIException;
+
+import static org.mockito.Mockito.*;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+public class JU_Batch {
+
+ AuthzEnv env;
+ Batch batch;
+
+ private class BatchStub extends Batch {
+
+ protected BatchStub(AuthzEnv env) throws APIException, IOException, OrganizationException {
+ super(env);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ protected void run(AuthzTrans trans) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ protected void _close(AuthzTrans trans) {
+ // TODO Auto-generated method stub
+
+ }
+
+ }
+
+ @Before
+ public void setUp() throws OrganizationException {
+ env = new AuthzEnv();
+ env.access().setProperty(Config.CADI_LATITUDE, "38.550674");
+ env.access().setProperty(Config.CADI_LONGITUDE, "-90.146942");
+ env.setProperty("DRY_RUN", "test");
+ env.setProperty("Organization.@aaf.com", "test");
+ //env.setProperty("Organization.com.@aaf", "java.lang.Integer");
+ env.setProperty("Organization.com.@aaf", "org.onap.aaf.auth.org.Organization");
+ env.setProperty("CASS_ENV", "test");
+ env.setProperty("test.VERSION", "test.VERSION");
+ }
+
+ @Test
+ public void testIsSpecial() throws APIException, IOException, OrganizationException {
+ //BatchStub bStub = new BatchStub(env);
+ //bStub.isSpecial("user");
+ }
+
+}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchException.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchException.java
new file mode 100644
index 00000000..dad723b9
--- /dev/null
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchException.java
@@ -0,0 +1,59 @@
+/**
+ * ============LICENSE_START====================================================
+ * org.onap.aaf
+ * ===========================================================================
+ * Copyright (c) 2018 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====================================================
+ *
+ */
+
+
+package org.onap.aaf.auth.test;
+
+import static org.junit.Assert.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.onap.aaf.auth.BatchException;
+
+import static org.mockito.Mockito.*;
+import org.junit.Test;
+
+public class JU_BatchException {
+
+ BatchException bExcept1;
+ BatchException bExcept2;
+ BatchException bExcept3;
+ BatchException bExcept4;
+ BatchException bExcept5;
+ Throwable throwable;
+
+ @Before
+ public void setUp() {
+ throwable = new Throwable();
+ }
+
+ @Test
+ public void test() {
+ bExcept1 = new BatchException();
+ bExcept2 = new BatchException("test");
+ bExcept3 = new BatchException(throwable);
+ bExcept4 = new BatchException("test", throwable);
+ bExcept5 = new BatchException("test", throwable,true,true);
+ }
+
+}