19
19
*/
20
20
package org .xwiki .rendering .wikimodel .test ;
21
21
22
+ import org .junit .jupiter .api .Test ;
22
23
import org .xwiki .rendering .wikimodel .WikiParameters ;
23
24
import org .xwiki .rendering .wikimodel .WikiReference ;
24
25
import org .xwiki .rendering .wikimodel .xwiki .xwiki20 .XWikiReferenceParser ;
25
26
26
- import org .junit .Assert ;
27
- import junit .framework . TestCase ;
27
+ import static org .junit .jupiter . api . Assertions . assertEquals ;
28
+ import static org . junit .jupiter . api . Assertions . assertNull ;
28
29
29
30
/**
30
31
* @version $Id$
31
32
* @since 4.0M1
32
33
*/
33
- public class XWikiReferenceParserTest extends TestCase
34
+ class XWikiReferenceParserTest
34
35
{
35
- public void testParseReferenceWhenReferenceOnly ()
36
+ @ Test
37
+ void parseReferenceWhenReferenceOnly ()
36
38
{
37
39
XWikiReferenceParser parser = new XWikiReferenceParser ();
38
40
WikiReference reference = parser .parse ("reference" );
39
41
assertNull (reference .getLabel ());
40
- Assert . assertEquals (WikiParameters .EMPTY , reference .getParameters ());
42
+ assertEquals (WikiParameters .EMPTY , reference .getParameters ());
41
43
assertEquals ("reference" , reference .getLink ());
42
44
}
43
45
44
- public void testParseReferenceWhenLabelSpecified ()
46
+ @ Test
47
+ void parseReferenceWhenLabelSpecified ()
45
48
{
46
49
XWikiReferenceParser parser = new XWikiReferenceParser ();
47
50
WikiReference reference = parser .parse ("label>>reference" );
@@ -50,7 +53,8 @@ public void testParseReferenceWhenLabelSpecified()
50
53
assertEquals ("reference" , reference .getLink ());
51
54
}
52
55
53
- public void testParseReferenceWhenParametersSpecified ()
56
+ @ Test
57
+ void parseReferenceWhenParametersSpecified ()
54
58
{
55
59
56
60
XWikiReferenceParser parser = new XWikiReferenceParser ();
@@ -69,7 +73,8 @@ public void testParseReferenceWhenParametersSpecified()
69
73
assertEquals ("reference" , reference .getLink ());
70
74
}
71
75
72
- public void testParseReferenceWhenLabelAndParametersSpecified ()
76
+ @ Test
77
+ void parseReferenceWhenLabelAndParametersSpecified ()
73
78
{
74
79
XWikiReferenceParser parser = new XWikiReferenceParser ();
75
80
WikiReference reference = parser .parse ("label>>reference||param=value" );
@@ -81,7 +86,8 @@ public void testParseReferenceWhenLabelAndParametersSpecified()
81
86
assertEquals ("reference" , reference .getLink ());
82
87
}
83
88
84
- public void testParseReferenceWithGreaterThanSymbolInLabel ()
89
+ @ Test
90
+ void parseReferenceWithGreaterThanSymbolInLabel ()
85
91
{
86
92
XWikiReferenceParser parser = new XWikiReferenceParser ();
87
93
WikiReference reference = parser
@@ -90,7 +96,8 @@ public void testParseReferenceWithGreaterThanSymbolInLabel()
90
96
assertEquals ("reference" , reference .getLink ());
91
97
}
92
98
93
- public void testParseReferenceWithPipeSymbolInLink ()
99
+ @ Test
100
+ void parseReferenceWithPipeSymbolInLink ()
94
101
{
95
102
XWikiReferenceParser parser = new XWikiReferenceParser ();
96
103
WikiReference reference = parser .parse ("reference|||param=value" );
@@ -101,7 +108,8 @@ public void testParseReferenceWithPipeSymbolInLink()
101
108
.getValue ());
102
109
}
103
110
104
- public void testParseReferenceWhenLabelAndParametersSpecifiedWithSomeEscaping ()
111
+ @ Test
112
+ void parseReferenceWhenLabelAndParametersSpecifiedWithSomeEscaping ()
105
113
{
106
114
XWikiReferenceParser parser = new XWikiReferenceParser ();
107
115
WikiReference reference = parser
@@ -114,7 +122,8 @@ public void testParseReferenceWhenLabelAndParametersSpecifiedWithSomeEscaping()
114
122
assertEquals ("refe||rence" , reference .getLink ());
115
123
}
116
124
117
- public void testParseReferenceWhenLabelAndParametersSpecifiedWithSomeEscapingAndInternalLink ()
125
+ @ Test
126
+ void parseReferenceWhenLabelAndParametersSpecifiedWithSomeEscapingAndInternalLink ()
118
127
{
119
128
XWikiReferenceParser parser = new XWikiReferenceParser ();
120
129
WikiReference reference = parser
0 commit comments