AT&T 2.0.19 Code drop, stage 3
[aaf/authz.git] / auth / auth-cass / src / test / java / org / onap / aaf / auth / cass / hl / JU_Question2.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.cass.hl;
23
24 import java.io.IOException;
25
26 import org.junit.After;
27 import org.junit.AfterClass;
28 import org.junit.Before;
29 import org.junit.BeforeClass;
30 import org.junit.Test;
31 import org.onap.aaf.auth.dao.hl.Question;
32
33 public class JU_Question2 {
34
35         @BeforeClass
36         public static void setUpBeforeClass() throws Exception {
37         }
38
39         @AfterClass
40         public static void tearDownAfterClass() throws Exception {
41         }
42
43         @Before
44         public void setUp() throws Exception {
45         }
46
47         @After
48         public void tearDown() throws Exception {
49         }
50
51         @Test
52         public void test() throws IOException {
53                 String s,u;
54                 System.out.println((s="com") + '=' + (u=Question.toUnique(s)));
55                 System.out.println(u+'='+(Question.fromUnique(u)));
56                 System.out.println((s="org.osaaf.cdp.Tenant32_what-a-joy") + '=' + (u=Question.toUnique(s)));
57                 System.out.println(u+'='+(Question.fromUnique(u)));
58                 System.out.println((s="org.osaaf.cdp") + '=' + (u=Question.toUnique(s)));
59                 System.out.println(u+'='+(Question.fromUnique(u)));
60
61 //              Assert.assertSame(s="com", Question.toUnique(s));
62 //              Assert.assertSame(s="", Question.toUnique(s));
63 //              Assert.assertSame(s="com.aa", Question.toUnique(s));
64 //              Assert.assertNotSame(s="com.Aa", Question.toUnique(s));
65 //              Assert.assertEquals("com.aa", Question.toUnique(s));
66 //              Assert.assertNotSame(s="com.Aa.1", Question.toUnique(s));
67 //              Assert.assertEquals("com.aa.1", Question.toUnique(s));
68 //              Assert.assertNotSame(s="com.Aa.1-3", Question.toUnique(s));
69 //              Assert.assertEquals("com.aa.13", Question.toUnique(s));
70 //              Assert.assertEquals("com.aa.13", Question.toUnique("com.aA.1_3"));
71         }
72
73 }