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.cass.hl;
24 import java.io.IOException;
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;
33 public class JU_Question2 {
36 public static void setUpBeforeClass() throws Exception {
40 public static void tearDownAfterClass() throws Exception {
44 public void setUp() throws Exception {
48 public void tearDown() throws Exception {
52 public void test() throws IOException {
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)));
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"));