1ef6f3b8e2d26e0772ebdd3eaa3bc878af56640a
[aaf/authz.git] / auth / auth-batch / src / test / java / org / onap / aaf / auth / batch / test / JU_Batch.java
1 /**
2  * ============LICENSE_START====================================================
3  * org.onap.aaf
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
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
22 package org.onap.aaf.auth.batch.test;
23
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;
40
41 import static org.mockito.Mockito.*;
42
43 import java.io.IOException;
44
45 import org.junit.Test;
46
47 public class JU_Batch {
48
49     AuthzEnv env;
50     Batch batch;
51     
52     private class BatchStub extends Batch {
53
54         protected BatchStub(AuthzEnv env) throws APIException, IOException, OrganizationException {
55             super(env);
56             // TODO Auto-generated constructor stub
57         }
58
59         @Override
60         protected void run(AuthzTrans trans) {
61             // TODO Auto-generated method stub
62             
63         }
64
65         @Override
66         protected void _close(AuthzTrans trans) {
67             // TODO Auto-generated method stub
68             
69         }
70
71     }
72     
73     @Before
74     public void setUp() throws OrganizationException {
75         env = new AuthzEnv();
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");
84     }
85     
86     @Test
87     public void testIsSpecial() throws APIException, IOException, OrganizationException {
88         //BatchStub bStub = new BatchStub(env);
89         //bStub.isSpecial("user");
90     }
91
92 }