Skip to content

Commit 45d8aad

Browse files
committed
Polishing
1 parent b5db730 commit 45d8aad

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ParamsRequestConditionTests.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,55 +32,55 @@
3232
* @author Rossen Stoyanchev
3333
* @author Stephane Nicoll
3434
*/
35-
public class ParamsRequestConditionTests {
35+
class ParamsRequestConditionTests {
3636

3737
@Test
38-
public void paramEquals() {
38+
void paramEquals() {
3939
assertThat(new ParamsRequestCondition("foo")).isEqualTo(new ParamsRequestCondition("foo"));
40-
assertThat(new ParamsRequestCondition("foo").equals(new ParamsRequestCondition("bar"))).isFalse();
41-
assertThat(new ParamsRequestCondition("foo").equals(new ParamsRequestCondition("FOO"))).isFalse();
40+
assertThat(new ParamsRequestCondition("foo")).isNotEqualTo(new ParamsRequestCondition("bar"));
41+
assertThat(new ParamsRequestCondition("foo")).isNotEqualTo(new ParamsRequestCondition("FOO"));
4242
assertThat(new ParamsRequestCondition("foo=bar")).isEqualTo(new ParamsRequestCondition("foo=bar"));
43-
assertThat(new ParamsRequestCondition("foo=bar").equals(new ParamsRequestCondition("FOO=bar"))).isFalse();
43+
assertThat(new ParamsRequestCondition("foo=bar")).isNotEqualTo(new ParamsRequestCondition("FOO=bar"));
4444
}
4545

4646
@Test
47-
public void paramPresent() {
47+
void paramPresent() {
4848
ParamsRequestCondition condition = new ParamsRequestCondition("foo");
4949
assertThat(condition.getMatchingCondition(MockServerWebExchange.from(get("/path?foo=")))).isNotNull();
5050
}
5151

5252
@Test // SPR-15831
53-
public void paramPresentNullValue() {
53+
void paramPresentNullValue() {
5454
ParamsRequestCondition condition = new ParamsRequestCondition("foo");
5555
assertThat(condition.getMatchingCondition(MockServerWebExchange.from(get("/path?foo")))).isNotNull();
5656
}
5757

5858
@Test
59-
public void paramPresentNoMatch() {
59+
void paramPresentNoMatch() {
6060
ParamsRequestCondition condition = new ParamsRequestCondition("foo");
6161
assertThat(condition.getMatchingCondition(MockServerWebExchange.from(get("/path?bar=")))).isNull();
6262
}
6363

6464
@Test
65-
public void paramNotPresent() {
65+
void paramNotPresent() {
6666
MockServerWebExchange exchange = MockServerWebExchange.from(get("/"));
6767
assertThat(new ParamsRequestCondition("!foo").getMatchingCondition(exchange)).isNotNull();
6868
}
6969

7070
@Test
71-
public void paramValueMatch() {
71+
void paramValueMatch() {
7272
ParamsRequestCondition condition = new ParamsRequestCondition("foo=bar");
7373
assertThat(condition.getMatchingCondition(MockServerWebExchange.from(get("/path?foo=bar")))).isNotNull();
7474
}
7575

7676
@Test
77-
public void paramValueNoMatch() {
77+
void paramValueNoMatch() {
7878
ParamsRequestCondition condition = new ParamsRequestCondition("foo=bar");
7979
assertThat(condition.getMatchingCondition(MockServerWebExchange.from(get("/path?foo=bazz")))).isNull();
8080
}
8181

8282
@Test
83-
public void compareTo() {
83+
void compareTo() {
8484
ServerWebExchange exchange = MockServerWebExchange.from(get("/"));
8585

8686
ParamsRequestCondition condition1 = new ParamsRequestCondition("foo", "bar", "baz");
@@ -94,7 +94,7 @@ public void compareTo() {
9494
}
9595

9696
@Test // SPR-16674
97-
public void compareToWithMoreSpecificMatchByValue() {
97+
void compareToWithMoreSpecificMatchByValue() {
9898
ServerWebExchange exchange = MockServerWebExchange.from(get("/"));
9999

100100
ParamsRequestCondition condition1 = new ParamsRequestCondition("response_type=code");
@@ -105,7 +105,7 @@ public void compareToWithMoreSpecificMatchByValue() {
105105
}
106106

107107
@Test
108-
public void compareToWithNegatedMatch() {
108+
void compareToWithNegatedMatch() {
109109
ServerWebExchange exchange = MockServerWebExchange.from(get("/"));
110110

111111
ParamsRequestCondition condition1 = new ParamsRequestCondition("response_type!=code");
@@ -115,7 +115,7 @@ public void compareToWithNegatedMatch() {
115115
}
116116

117117
@Test
118-
public void combineWitOtherEmpty() {
118+
void combineWithOtherEmpty() {
119119
ParamsRequestCondition condition1 = new ParamsRequestCondition("foo=bar");
120120
ParamsRequestCondition condition2 = new ParamsRequestCondition();
121121

@@ -124,7 +124,7 @@ public void combineWitOtherEmpty() {
124124
}
125125

126126
@Test
127-
public void combineWitThisEmpty() {
127+
void combineWithThisEmpty() {
128128
ParamsRequestCondition condition1 = new ParamsRequestCondition();
129129
ParamsRequestCondition condition2 = new ParamsRequestCondition("foo=bar");
130130

@@ -133,7 +133,7 @@ public void combineWitThisEmpty() {
133133
}
134134

135135
@Test
136-
public void combine() {
136+
void combine() {
137137
ParamsRequestCondition condition1 = new ParamsRequestCondition("foo=bar");
138138
ParamsRequestCondition condition2 = new ParamsRequestCondition("foo=baz");
139139

spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ParamsRequestConditionTests.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,67 +31,67 @@
3131
* @author Arjen Poutsma
3232
* @author Stephane Nicoll
3333
*/
34-
public class ParamsRequestConditionTests {
34+
class ParamsRequestConditionTests {
3535

3636
@Test
37-
public void paramEquals() {
37+
void paramEquals() {
3838
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"));
4141
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"));
4343
}
4444

4545
@Test
46-
public void paramPresent() {
46+
void paramPresent() {
4747
MockHttpServletRequest request = new MockHttpServletRequest();
4848
request.addParameter("foo", "");
4949

5050
assertThat(new ParamsRequestCondition("foo").getMatchingCondition(request)).isNotNull();
5151
}
5252

5353
@Test // SPR-15831
54-
public void paramPresentNullValue() {
54+
void paramPresentNullValue() {
5555
MockHttpServletRequest request = new MockHttpServletRequest();
5656
request.addParameter("foo", (String) null);
5757

5858
assertThat(new ParamsRequestCondition("foo").getMatchingCondition(request)).isNotNull();
5959
}
6060

6161
@Test
62-
public void paramPresentNoMatch() {
62+
void paramPresentNoMatch() {
6363
MockHttpServletRequest request = new MockHttpServletRequest();
6464
request.addHeader("bar", "");
6565

6666
assertThat(new ParamsRequestCondition("foo").getMatchingCondition(request)).isNull();
6767
}
6868

6969
@Test
70-
public void paramNotPresent() {
70+
void paramNotPresent() {
7171
ParamsRequestCondition condition = new ParamsRequestCondition("!foo");
7272
MockHttpServletRequest request = new MockHttpServletRequest();
7373

7474
assertThat(condition.getMatchingCondition(request)).isNotNull();
7575
}
7676

7777
@Test
78-
public void paramValueMatch() {
78+
void paramValueMatch() {
7979
MockHttpServletRequest request = new MockHttpServletRequest();
8080
request.addParameter("foo", "bar");
8181

8282
assertThat(new ParamsRequestCondition("foo=bar").getMatchingCondition(request)).isNotNull();
8383
}
8484

8585
@Test
86-
public void paramValueNoMatch() {
86+
void paramValueNoMatch() {
8787
MockHttpServletRequest request = new MockHttpServletRequest();
8888
request.addParameter("foo", "bazz");
8989

9090
assertThat(new ParamsRequestCondition("foo=bar").getMatchingCondition(request)).isNull();
9191
}
9292

9393
@Test
94-
public void compareTo() {
94+
void compareTo() {
9595
MockHttpServletRequest request = new MockHttpServletRequest();
9696

9797
ParamsRequestCondition condition1 = new ParamsRequestCondition("foo", "bar", "baz");
@@ -105,7 +105,7 @@ public void compareTo() {
105105
}
106106

107107
@Test // SPR-16674
108-
public void compareToWithMoreSpecificMatchByValue() {
108+
void compareToWithMoreSpecificMatchByValue() {
109109
MockHttpServletRequest request = new MockHttpServletRequest();
110110

111111
ParamsRequestCondition condition1 = new ParamsRequestCondition("response_type=code");
@@ -116,7 +116,7 @@ public void compareToWithMoreSpecificMatchByValue() {
116116
}
117117

118118
@Test
119-
public void compareToWithNegatedMatch() {
119+
void compareToWithNegatedMatch() {
120120
MockHttpServletRequest request = new MockHttpServletRequest();
121121

122122
ParamsRequestCondition condition1 = new ParamsRequestCondition("response_type!=code");
@@ -126,7 +126,7 @@ public void compareToWithNegatedMatch() {
126126
}
127127

128128
@Test
129-
public void combineWithOtherEmpty() {
129+
void combineWithOtherEmpty() {
130130
ParamsRequestCondition condition1 = new ParamsRequestCondition("foo=bar");
131131
ParamsRequestCondition condition2 = new ParamsRequestCondition();
132132

@@ -135,7 +135,7 @@ public void combineWithOtherEmpty() {
135135
}
136136

137137
@Test
138-
public void combineWithThisEmpty() {
138+
void combineWithThisEmpty() {
139139
ParamsRequestCondition condition1 = new ParamsRequestCondition();
140140
ParamsRequestCondition condition2 = new ParamsRequestCondition("foo=bar");
141141

@@ -144,7 +144,7 @@ public void combineWithThisEmpty() {
144144
}
145145

146146
@Test
147-
public void combine() {
147+
void combine() {
148148
ParamsRequestCondition condition1 = new ParamsRequestCondition("foo=bar");
149149
ParamsRequestCondition condition2 = new ParamsRequestCondition("foo=baz");
150150

0 commit comments

Comments
 (0)