31
31
* @author Arjen Poutsma
32
32
* @author Stephane Nicoll
33
33
*/
34
- public class ParamsRequestConditionTests {
34
+ class ParamsRequestConditionTests {
35
35
36
36
@ Test
37
- public void paramEquals () {
37
+ void paramEquals () {
38
38
assertThat (new ParamsRequestCondition ("foo" )).isEqualTo (new ParamsRequestCondition ("foo" ));
39
- assertThat (new ParamsRequestCondition ("foo" ). equals (new ParamsRequestCondition ("bar" ))). isFalse ( );
40
- assertThat (new ParamsRequestCondition ("foo" ). equals (new ParamsRequestCondition ("FOO" ))). isFalse ( );
39
+ assertThat (new ParamsRequestCondition ("foo" )). isNotEqualTo (new ParamsRequestCondition ("bar" ));
40
+ assertThat (new ParamsRequestCondition ("foo" )). isNotEqualTo (new ParamsRequestCondition ("FOO" ));
41
41
assertThat (new ParamsRequestCondition ("foo=bar" )).isEqualTo (new ParamsRequestCondition ("foo=bar" ));
42
- assertThat (new ParamsRequestCondition ("foo=bar" ). equals (new ParamsRequestCondition ("FOO=bar" ))). isFalse ( );
42
+ assertThat (new ParamsRequestCondition ("foo=bar" )). isNotEqualTo (new ParamsRequestCondition ("FOO=bar" ));
43
43
}
44
44
45
45
@ Test
46
- public void paramPresent () {
46
+ void paramPresent () {
47
47
MockHttpServletRequest request = new MockHttpServletRequest ();
48
48
request .addParameter ("foo" , "" );
49
49
50
50
assertThat (new ParamsRequestCondition ("foo" ).getMatchingCondition (request )).isNotNull ();
51
51
}
52
52
53
53
@ Test // SPR-15831
54
- public void paramPresentNullValue () {
54
+ void paramPresentNullValue () {
55
55
MockHttpServletRequest request = new MockHttpServletRequest ();
56
56
request .addParameter ("foo" , (String ) null );
57
57
58
58
assertThat (new ParamsRequestCondition ("foo" ).getMatchingCondition (request )).isNotNull ();
59
59
}
60
60
61
61
@ Test
62
- public void paramPresentNoMatch () {
62
+ void paramPresentNoMatch () {
63
63
MockHttpServletRequest request = new MockHttpServletRequest ();
64
64
request .addHeader ("bar" , "" );
65
65
66
66
assertThat (new ParamsRequestCondition ("foo" ).getMatchingCondition (request )).isNull ();
67
67
}
68
68
69
69
@ Test
70
- public void paramNotPresent () {
70
+ void paramNotPresent () {
71
71
ParamsRequestCondition condition = new ParamsRequestCondition ("!foo" );
72
72
MockHttpServletRequest request = new MockHttpServletRequest ();
73
73
74
74
assertThat (condition .getMatchingCondition (request )).isNotNull ();
75
75
}
76
76
77
77
@ Test
78
- public void paramValueMatch () {
78
+ void paramValueMatch () {
79
79
MockHttpServletRequest request = new MockHttpServletRequest ();
80
80
request .addParameter ("foo" , "bar" );
81
81
82
82
assertThat (new ParamsRequestCondition ("foo=bar" ).getMatchingCondition (request )).isNotNull ();
83
83
}
84
84
85
85
@ Test
86
- public void paramValueNoMatch () {
86
+ void paramValueNoMatch () {
87
87
MockHttpServletRequest request = new MockHttpServletRequest ();
88
88
request .addParameter ("foo" , "bazz" );
89
89
90
90
assertThat (new ParamsRequestCondition ("foo=bar" ).getMatchingCondition (request )).isNull ();
91
91
}
92
92
93
93
@ Test
94
- public void compareTo () {
94
+ void compareTo () {
95
95
MockHttpServletRequest request = new MockHttpServletRequest ();
96
96
97
97
ParamsRequestCondition condition1 = new ParamsRequestCondition ("foo" , "bar" , "baz" );
@@ -105,7 +105,7 @@ public void compareTo() {
105
105
}
106
106
107
107
@ Test // SPR-16674
108
- public void compareToWithMoreSpecificMatchByValue () {
108
+ void compareToWithMoreSpecificMatchByValue () {
109
109
MockHttpServletRequest request = new MockHttpServletRequest ();
110
110
111
111
ParamsRequestCondition condition1 = new ParamsRequestCondition ("response_type=code" );
@@ -116,7 +116,7 @@ public void compareToWithMoreSpecificMatchByValue() {
116
116
}
117
117
118
118
@ Test
119
- public void compareToWithNegatedMatch () {
119
+ void compareToWithNegatedMatch () {
120
120
MockHttpServletRequest request = new MockHttpServletRequest ();
121
121
122
122
ParamsRequestCondition condition1 = new ParamsRequestCondition ("response_type!=code" );
@@ -126,7 +126,7 @@ public void compareToWithNegatedMatch() {
126
126
}
127
127
128
128
@ Test
129
- public void combineWithOtherEmpty () {
129
+ void combineWithOtherEmpty () {
130
130
ParamsRequestCondition condition1 = new ParamsRequestCondition ("foo=bar" );
131
131
ParamsRequestCondition condition2 = new ParamsRequestCondition ();
132
132
@@ -135,7 +135,7 @@ public void combineWithOtherEmpty() {
135
135
}
136
136
137
137
@ Test
138
- public void combineWithThisEmpty () {
138
+ void combineWithThisEmpty () {
139
139
ParamsRequestCondition condition1 = new ParamsRequestCondition ();
140
140
ParamsRequestCondition condition2 = new ParamsRequestCondition ("foo=bar" );
141
141
@@ -144,7 +144,7 @@ public void combineWithThisEmpty() {
144
144
}
145
145
146
146
@ Test
147
- public void combine () {
147
+ void combine () {
148
148
ParamsRequestCondition condition1 = new ParamsRequestCondition ("foo=bar" );
149
149
ParamsRequestCondition condition2 = new ParamsRequestCondition ("foo=baz" );
150
150
0 commit comments