Skip to content

Commit 39682b7

Browse files
committed
Upgrade to Hamcrest 1.3
1 parent 22dfe93 commit 39682b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ configure(allprojects) {
3434
}
3535

3636
dependencies {
37-
testCompile "org.hamcrest:hamcrest-all:1.1"
37+
testCompile "org.hamcrest:hamcrest-all:1.3"
3838
testCompile "org.easymock:easymock:2.5.1"
3939
}
4040

spring-test-mvc/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/StatusAssertionTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
2626
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
2727

28+
import org.hamcrest.Matcher;
2829
import org.junit.Before;
2930
import org.junit.Test;
3031
import org.springframework.http.HttpStatus;
@@ -60,11 +61,10 @@ public void testHttpStatus() throws Exception {
6061
this.mockMvc.perform(get("/badRequest")).andExpect(status().isBadRequest());
6162
}
6263

63-
@SuppressWarnings("unchecked")
6464
@Test
6565
public void testMatcher() throws Exception {
66-
this.mockMvc.perform(get("/badRequest"))
67-
.andExpect(status().is(allOf(greaterThanOrEqualTo(400), lessThan(500))));
66+
Matcher<Integer> matcher = allOf(greaterThanOrEqualTo(400), lessThan(500));
67+
this.mockMvc.perform(get("/badRequest")).andExpect(status().is(matcher));
6868
}
6969

7070
@Test

0 commit comments

Comments
 (0)