X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=misc%2Fxgen%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fmisc%2Fxgen%2Fhtml%2FJU_HTML5GenTest.java;h=6426fae5245c101af5dac48bfc9f13e53b04a444;hb=4b5a7d721d994a49057e9bfb403c7bff1b376660;hp=69ebf89b062edbd23563808db15b18468cce0a02;hpb=f85f0889b3b0e5e9694afab4dd01a4a97a155188;p=aaf%2Fauthz.git diff --git a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java index 69ebf89b..6426fae5 100644 --- a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java +++ b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java @@ -36,100 +36,100 @@ import org.mockito.Mock; public class JU_HTML5GenTest { -// private final static String DOCTYPE = ""; +// private final static String DOCTYPE = ""; - private String charset = "utf-8"; + private String charset = "utf-8"; - private final String CHARSET_LINE = ""; + private final String CHARSET_LINE = ""; - @Mock - Writer w; + @Mock + Writer w; - @Before - public void setUp() throws Exception { + @Before + public void setUp() throws Exception { - w = mock(Writer.class); - } + w = mock(Writer.class); + } - @Test - public void testHTML() throws IOException { + @Test + public void testHTML() throws IOException { - HTML5Gen gen = new HTML5Gen(w); + HTML5Gen gen = new HTML5Gen(w); - gen.html("attributes"); + gen.html("attributes"); - Map map = new TreeMap<>(); + Map map = new TreeMap<>(); - for (char ch : "html".toCharArray()) { - Integer times = map.get(ch); - map.put(ch, (times == null ? 0 : times) + 1); - } + for (char ch : "html".toCharArray()) { + Integer times = map.get(ch); + map.put(ch, (times == null ? 0 : times) + 1); + } - for (char ch : map.keySet()) { - verify(w, atLeast(map.get(ch))).write(ch); - } - verify(w, atLeast(1)).write(anyInt()); - } + for (char ch : map.keySet()) { + verify(w, atLeast(map.get(ch))).write(ch); + } + verify(w, atLeast(1)).write(anyInt()); + } - @Test - public void testHead() throws IOException { + @Test + public void testHead() throws IOException { - HTML5Gen gen = new HTML5Gen(w); + HTML5Gen gen = new HTML5Gen(w); - gen.head(); + gen.head(); - Map map = new TreeMap<>(); + Map map = new TreeMap<>(); - for (char ch : "head".toCharArray()) { - Integer times = map.get(ch); - map.put(ch, (times == null ? 0 : times) + 1); - } + for (char ch : "head".toCharArray()) { + Integer times = map.get(ch); + map.put(ch, (times == null ? 0 : times) + 1); + } - for (char ch : map.keySet()) { - verify(w, atLeast(map.get(ch))).write(ch); - } - } + for (char ch : map.keySet()) { + verify(w, atLeast(map.get(ch))).write(ch); + } + } - @Test - public void testBody() throws IOException { + @Test + public void testBody() throws IOException { - HTML5Gen gen = new HTML5Gen(w); + HTML5Gen gen = new HTML5Gen(w); - gen.body("attributes"); + gen.body("attributes"); - Map map = new TreeMap<>(); + Map map = new TreeMap<>(); - for (char ch : "body".toCharArray()) { - Integer times = map.get(ch); - map.put(ch, (times == null ? 0 : times) + 1); - } - for (char ch : "attributes".toCharArray()) { - Integer times = map.get(ch); - map.put(ch, (times == null ? 0 : times) + 1); - } + for (char ch : "body".toCharArray()) { + Integer times = map.get(ch); + map.put(ch, (times == null ? 0 : times) + 1); + } + for (char ch : "attributes".toCharArray()) { + Integer times = map.get(ch); + map.put(ch, (times == null ? 0 : times) + 1); + } - for (char ch : map.keySet()) { - verify(w, atLeast(map.get(ch))).write(ch); - } - } + for (char ch : map.keySet()) { + verify(w, atLeast(map.get(ch))).write(ch); + } + } - @Test - public void testCharSet() throws IOException { + @Test + public void testCharSet() throws IOException { - HTML5Gen gen = new HTML5Gen(w); + HTML5Gen gen = new HTML5Gen(w); - gen.charset(charset); + gen.charset(charset); - Map map = new TreeMap<>(); + Map map = new TreeMap<>(); - for (char ch : CHARSET_LINE.toCharArray()) { - Integer times = map.get(ch); - map.put(ch, (times == null ? 0 : times) + 1); - } + for (char ch : CHARSET_LINE.toCharArray()) { + Integer times = map.get(ch); + map.put(ch, (times == null ? 0 : times) + 1); + } - for (char ch : map.keySet()) { - verify(w, atLeast(map.get(ch))).write(ch); - } - } + for (char ch : map.keySet()) { + verify(w, atLeast(map.get(ch))).write(ch); + } + } }