Sonar Fixes, Formatting
[aaf/authz.git] / misc / rosetta / src / test / java / org / onap / aaf / misc / rosetta / test / JU_Struct.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.misc.rosetta.test;
23
24 import org.junit.Test;
25 import org.onap.aaf.misc.rosetta.JaxInfo;
26
27 import s.xsd.LargerData;
28
29 public class JU_Struct {
30     public final static String XML ="<LargerData xmlns=\"urn:s:xsd\">\n" +
31                                         "<SampleData>\n" +
32                                             "<id>sd object 1</id>\n" +
33                                             "<date>1346439215932</date>\n" +
34                                             "<item>Item 1.1</item>\n" +
35                                             "<item>Item 1.2</item>\n" +
36                                         "</SampleData>\n" +
37                                         "<SampleData>\n" +
38                                             "<id>sd object 2</id>\n" +
39                                             "<date>1346439215932</date>\n" +
40                                             "<item>Item 2.1</item>\n" +
41                                             "<item>Item 2.2</item>\n" +
42                                         "</SampleData>\n" +
43                                         "<fluff>MyFluff</fluff>\n" +
44                                     "</LargerData>\n";
45
46 //    @Test
47 //    public void test2() throws Exception  {
48 //
49 //        SampleData sd = new SampleData();
50 //        sd.setDate(new Date().getTime());
51 //        sd.setId("myId");
52 //        sd.getItem().add("Item 1.1");
53 //
54 //        InObj<SampleData> inObj = new InObj<SampleData>(SampleData.class);
55 //
56 //        JaxSet<SampleData> jaxSet = JaxSet.get(SampleData.class);
57 //         Setter<SampleData> setter = jaxSet.setter("id");
58 //         setter.set(sd, "Your ID");
59 //
60 //         for (Entry<String, Getter<SampleData>> es : jaxSet.getters()) {
61 //             System.out.print(es.getKey());
62 //             System.out.print(' ');
63 //             System.out.println(es.getValue().get(sd));
64 //         }
65 //    }
66
67     @Test
68     public void test() throws Exception  {
69         JaxInfo ji = JaxInfo.build(LargerData.class);
70         System.out.println(ji);
71     }
72
73 }