Sonar Fixes, Formatting
[aaf/authz.git] / auth / auth-deforg / src / test / java / org / onap / aaf / org / test / JU_Identities.java
1 /*******************************************************************************
2  * ============LICENSE_START====================================================
3  * * org.onap.aaf
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
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
23 package org.onap.aaf.org.test;
24
25 import java.io.File;
26 import java.io.IOException;
27
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;
39
40 /**
41  *
42  */
43 public class JU_Identities {
44 //
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;
49 //
50 //    /**
51 //     * @throws java.lang.Exception
52 //     */
53 //    @BeforeClass
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);
62 //        } else {
63 //
64 //            throw new Exception("Data File for Tests, \"" + DATA_IDENTITIES
65 //                    + "\" must exist before test can run. (Current dir is " + System.getProperty("user.dir") + ")");
66 //        }
67 //    }
68 //
69 //    /**
70 //     * @throws java.lang.Exception
71 //     */
72 //    @AfterClass
73 //    public static void tearDownAfterClass() throws Exception {
74 //        AuthzTrans trans = env.newTransNoAvg();
75 //        if (ids!=null) {
76 //            ids.close(trans);
77 //        }
78 //    }
79 //
80 //    /**
81 //     * @throws java.lang.Exception
82 //     */
83 //    @Before
84 //    public void setUp() throws Exception {
85 //    }
86 //
87 //    /**
88 //     * @throws java.lang.Exception
89 //     */
90 //    @After
91 //    public void tearDown() throws Exception {
92 //    }
93 //
94 //    @Test
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);
100 //
101 //        id = ids.find("mmanager",reuse);
102 //        Assert.assertNotNull(id);
103 //        System.out.println(id);
104 //
105 //        //TODO Fill out JUnit with Tests of all Methods in "Data id"
106 //    }
107
108 }