1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package net.fckeditor.tool;
22
23 import static org.junit.Assert.*;
24
25 import org.junit.Test;
26
27
28
29
30
31
32 public class XHtmlTagToolTest {
33
34 @Test
35 public void testClosingTag01() throws Exception {
36 XHtmlTagTool tag = new XHtmlTagTool("test");
37 assertEquals("<test />", tag.toString());
38 }
39
40 @Test
41 public void testClosingTag02() throws Exception {
42 XHtmlTagTool tag = new XHtmlTagTool("test", "");
43 assertEquals("<test />", tag.toString());
44 }
45
46 @Test
47 public void testClosingTag03() throws Exception {
48 XHtmlTagTool tag = new XHtmlTagTool("test", "val");
49 assertEquals("<test>val</test>", tag.toString());
50 }
51
52 @Test
53 public void testClosingTag04() throws Exception {
54 XHtmlTagTool tag = new XHtmlTagTool("test", XHtmlTagTool.SPACE);
55 assertEquals("<test> </test>", tag.toString());
56 }
57 }