2 * ============LICENSE_START====================================================
4 * ===========================================================================
5 * Copyright (c) 2018 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
11 * http://www.apache.org/licenses/LICENSE-2.0
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====================================================
22 package org.onap.aaf.auth.batch.test;
24 import static org.junit.Assert.*;
25 import org.junit.After;
26 import org.junit.Before;
27 import org.junit.Test;
28 import org.mockito.Mock;
29 import org.mockito.Mockito;
30 import org.onap.aaf.auth.batch.Batch;
31 import org.onap.aaf.auth.env.AuthzEnv;
32 import org.onap.aaf.auth.env.AuthzTrans;
33 import org.onap.aaf.auth.org.Organization;
34 import org.onap.aaf.auth.org.OrganizationException;
35 import org.onap.aaf.auth.org.OrganizationFactory;
36 import org.onap.aaf.cadi.client.Future;
37 import org.onap.aaf.cadi.client.Rcli;
38 import org.onap.aaf.cadi.config.Config;
39 import org.onap.aaf.misc.env.APIException;
41 import static org.mockito.Mockito.*;
43 import java.io.IOException;
45 import org.junit.Test;
47 public class JU_Batch {
52 private class BatchStub extends Batch {
54 protected BatchStub(AuthzEnv env) throws APIException, IOException, OrganizationException {
56 // TODO Auto-generated constructor stub
60 protected void run(AuthzTrans trans) {
61 // TODO Auto-generated method stub
66 protected void _close(AuthzTrans trans) {
67 // TODO Auto-generated method stub
74 public void setUp() throws OrganizationException {
76 env.access().setProperty(Config.CADI_LATITUDE, "38.550674");
77 env.access().setProperty(Config.CADI_LONGITUDE, "-90.146942");
78 env.setProperty("DRY_RUN", "test");
79 env.setProperty("Organization.@aaf.com", "test");
80 //env.setProperty("Organization.com.@aaf", "java.lang.Integer");
81 env.setProperty("Organization.com.@aaf", "org.onap.aaf.auth.org.Organization");
82 env.setProperty("CASS_ENV", "test");
83 env.setProperty("test.VERSION", "test.VERSION");
87 public void testIsSpecial() throws APIException, IOException, OrganizationException {
88 //BatchStub bStub = new BatchStub(env);
89 //bStub.isSpecial("user");