\r
public class JU_XMLGenTest {\r
\r
- @Mock\r
- private Writer writer;\r
+ @Mock\r
+ private Writer writer;\r
\r
- String XML_TAG = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";\r
+ String XML_TAG = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";\r
\r
- Map<Character, Integer> map = new TreeMap<>();\r
+ Map<Character, Integer> map = new TreeMap<>();\r
\r
- @Before\r
- public void setUp() throws Exception {\r
- writer = mock(Writer.class);\r
- }\r
+ @Before\r
+ public void setUp() throws Exception {\r
+ writer = mock(Writer.class);\r
+ }\r
\r
- @Test\r
- public void testXMLGenWriter() throws IOException {\r
- XMLGen xmlGen = new XMLGen(writer);\r
+ @Test\r
+ public void testXMLGenWriter() throws IOException {\r
+ XMLGen xmlGen = new XMLGen(writer);\r
\r
- xmlGen.xml();\r
+ xmlGen.xml();\r
\r
- for (char ch : XML_TAG.toCharArray()) {\r
- Integer times = map.get(ch);\r
- map.put(ch, (times == null ? 0 : times) + 1);\r
- }\r
+ for (char ch : XML_TAG.toCharArray()) {\r
+ Integer times = map.get(ch);\r
+ map.put(ch, (times == null ? 0 : times) + 1);\r
+ }\r
\r
- for (char ch : map.keySet()) {\r
- verify(writer, times(map.get(ch))).write(ch);\r
- }\r
- }\r
+ for (char ch : map.keySet()) {\r
+ verify(writer, times(map.get(ch))).write(ch);\r
+ }\r
+ }\r
}
\ No newline at end of file