X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=misc%2Frosetta%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fmisc%2Frosetta%2Ftest%2FJU_FromXML.java;h=1a10779b5bc95a0065d9043337aa0c2f243109d8;hb=refs%2Fchanges%2F24%2F97124%2F3;hp=4fefe6224865a8631356e78a3901eff3149d3091;hpb=bdce7667a6e272e2fa32e298d957a0d9090c5bc9;p=aaf%2Fauthz.git diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromXML.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromXML.java index 4fefe622..1a10779b 100644 --- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromXML.java +++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromXML.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -45,8 +45,8 @@ import s.xsd.LargerData; public class JU_FromXML { private static int ITERATIONS = 1; ; - - private final static String xml = + + private final static String xml = "\n" + "\n" + " \n" + @@ -63,21 +63,21 @@ public class JU_FromXML { " \n" + " MyFluff\n" + "\n"; - - + + @Test public void test() throws Exception { InXML inXML = new InXML(LargerData.class); - + System.out.println(xml); StringBuilderWriter sbw = new StringBuilderWriter(1024); - + Reader rdr = new StringReader(xml); - + new OutRaw().extract(rdr, sbw, inXML); System.out.println(sbw.getBuffer()); } - + @Test public void xml2JSON() throws Exception { @@ -86,7 +86,7 @@ public class JU_FromXML { InXML inXML = new InXML(LargerData.class); StringBuilderWriter sbw = new StringBuilderWriter(1024); - + Trans trans; Report report = new Report(ITERATIONS,"XML"); do { @@ -101,7 +101,7 @@ public class JU_FromXML { } report.glean(trans,Env.XML); } while (report.go()); - + report.report(sbw); System.out.println(sbw.toString()); } @@ -113,7 +113,7 @@ public class JU_FromXML { InXML inXML = new InXML(LargerData.class); StringBuilderWriter sbw = new StringBuilderWriter(1024); - + Trans trans; Report report = new Report(ITERATIONS,"XML"); do { @@ -128,23 +128,23 @@ public class JU_FromXML { } report.glean(trans,Env.XML); } while (report.go()); - + report.report(sbw); System.out.println(sbw.toString()); } - - + + @Test public void warmup() throws Exception { if (ITERATIONS>20) { System.out.println("*** Warmup JAXB ***"); - + JAXBumar jaxbUmar = new JAXBumar(LargerData.class); JAXBmar jaxBmar = new JAXBmar(LargerData.class); //jaxBmar.asFragment(true); //jaxBmar.pretty(true); StringBuilderWriter sbw = new StringBuilderWriter(1024); - + LargerData ld; Trans trans; @@ -171,7 +171,7 @@ public class JU_FromXML { } report.glean(trans,Env.XML); } while (report.go()); - + report.report(sbw); System.out.println(sbw.toString()); } @@ -210,7 +210,7 @@ public class JU_FromXML { } report.glean(trans,Env.XML); } while (report.go()); - + report.report(sbw); System.out.println(sbw.toString()); }