1 /*******************************************************************************
2 * ============LICENSE_START====================================================
4 * * ===========================================================================
5 * * Copyright © 2017 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====================================================
21 ******************************************************************************/
23 package org.onap.aaf.org.test;
26 import java.io.IOException;
28 import org.junit.After;
29 import org.junit.AfterClass;
30 import org.junit.Assert;
31 import org.junit.Before;
32 import org.junit.BeforeClass;
33 import org.junit.Test;
34 import org.onap.aaf.auth.env.AuthzEnv;
35 import org.onap.aaf.auth.env.AuthzTrans;
36 import org.onap.aaf.auth.local.AbsData.Reuse;
37 import org.onap.aaf.org.Identities;
38 import org.onap.aaf.org.Identities.Data;
43 public class JU_Identities {
45 // private static final String DATA_IDENTITIES = "/opt/app/onap/data/identities.dat";
46 // private static File fids;
47 // private static Identities ids;
48 // private static AuthzEnv env;
51 // * @throws java.lang.Exception
54 // public static void setUpBeforeClass() throws Exception {
55 // env = new AuthzEnv();
56 // AuthzTrans trans = env.newTransNoAvg();
57 // // Note: utilize TimeTaken, from trans.start if you want to time.
58 // fids = new File(DATA_IDENTITIES);
59 // if(fids.exists()) {
60 // ids = new Identities(fids);
61 // ids.open(trans, 5000);
64 // throw new Exception("Data File for Tests, \"" + DATA_IDENTITIES
65 // + "\" must exist before test can run. (Current dir is " + System.getProperty("user.dir") + ")");
70 // * @throws java.lang.Exception
73 // public static void tearDownAfterClass() throws Exception {
74 // AuthzTrans trans = env.newTransNoAvg();
81 // * @throws java.lang.Exception
84 // public void setUp() throws Exception {
88 // * @throws java.lang.Exception
91 // public void tearDown() throws Exception {
95 // public void test() throws IOException {
96 // Reuse reuse = ids.reuse(); // this object can be reused within the same thread.
97 // Data id = ids.find("osaaf",reuse);
98 // Assert.assertNotNull(id);
99 // System.out.println(id);
101 // id = ids.find("mmanager",reuse);
102 // Assert.assertNotNull(id);
103 // System.out.println(id);
105 // //TODO Fill out JUnit with Tests of all Methods in "Data id"