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_HTML4GenTest.java;h=6fa2afb86a1d0e0efdf580ca2edc0118e9bda15e;hb=4b5a7d721d994a49057e9bfb403c7bff1b376660;hp=9160095dbe87a460f1fa63412f0159bae6b1f040;hpb=6261a19e61138e861f5c7eaf37835205f19f1fe0;p=aaf%2Fauthz.git
diff --git a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java
index 9160095d..6fa2afb8 100644
--- a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java
+++ b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java
@@ -36,280 +36,280 @@ import org.mockito.Mock;
public class JU_HTML4GenTest {
- 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 {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(w);
- gen.html("attributes");
+ gen.html("attributes");
- Map map = new TreeMap<>();
- for (char ch : DOCTYPE.toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ Map map = new TreeMap<>();
+ for (char ch : DOCTYPE.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 : "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 {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(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 {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(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 {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(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);
+ }
+ }
- @Test
- public void testHeader() throws IOException {
+ @Test
+ public void testHeader() throws IOException {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(w);
- gen.header("attributes");
+ gen.header("attributes");
- Map map = new TreeMap<>();
+ Map map = new TreeMap<>();
- for (char ch : "header".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "header".toCharArray()) {
+ Integer times = map.get(ch);
+ map.put(ch, (times == null ? 0 : times) + 1);
+ }
- for (char ch : "div".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "div".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 : "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 testFooter() throws IOException {
+ @Test
+ public void testFooter() throws IOException {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(w);
- gen.footer("attributes");
+ gen.footer("attributes");
- Map map = new TreeMap<>();
+ Map map = new TreeMap<>();
- for (char ch : "footer".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "footer".toCharArray()) {
+ Integer times = map.get(ch);
+ map.put(ch, (times == null ? 0 : times) + 1);
+ }
- for (char ch : "div".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "div".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 : "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 testSection() throws IOException {
+ @Test
+ public void testSection() throws IOException {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(w);
- gen.section("attributes");
+ gen.section("attributes");
- Map map = new TreeMap<>();
+ Map map = new TreeMap<>();
- for (char ch : "section".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "section".toCharArray()) {
+ Integer times = map.get(ch);
+ map.put(ch, (times == null ? 0 : times) + 1);
+ }
- for (char ch : "div".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "div".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 : "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 testArticle() throws IOException {
+ @Test
+ public void testArticle() throws IOException {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(w);
- gen.article("attributes");
+ gen.article("attributes");
- Map map = new TreeMap<>();
+ Map map = new TreeMap<>();
- for (char ch : "attrib".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "attrib".toCharArray()) {
+ Integer times = map.get(ch);
+ map.put(ch, (times == null ? 0 : times) + 1);
+ }
- for (char ch : "div".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "div".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 : "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 testAside() throws IOException {
+ @Test
+ public void testAside() throws IOException {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(w);
- gen.aside("attributes");
+ gen.aside("attributes");
- Map map = new TreeMap<>();
+ Map map = new TreeMap<>();
- for (char ch : "aside".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "aside".toCharArray()) {
+ Integer times = map.get(ch);
+ map.put(ch, (times == null ? 0 : times) + 1);
+ }
- for (char ch : "div".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "div".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 : "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 testNav() throws IOException {
+ @Test
+ public void testNav() throws IOException {
- HTML4Gen gen = new HTML4Gen(w);
+ HTML4Gen gen = new HTML4Gen(w);
- gen.nav("attributes");
+ gen.nav("attributes");
- Map map = new TreeMap<>();
+ Map map = new TreeMap<>();
- for (char ch : "nav".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "nav".toCharArray()) {
+ Integer times = map.get(ch);
+ map.put(ch, (times == null ? 0 : times) + 1);
+ }
- for (char ch : "div".toCharArray()) {
- Integer times = map.get(ch);
- map.put(ch, (times == null ? 0 : times) + 1);
- }
+ for (char ch : "div".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 : "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);
+ }
+ }
}