Use AssertJ in spring-boot-samples
See gh-5083
This commit is contained in:
@@ -30,10 +30,7 @@ import org.springframework.http.RequestEntity;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SampleSessionRedisApplication}.
|
||||
@@ -73,12 +70,12 @@ public class SampleSessionRedisApplicationTests {
|
||||
HttpMethod.GET, uri);
|
||||
|
||||
String uuid2 = restTemplate.exchange(request, String.class).getBody();
|
||||
assertThat(uuid1, is(equalTo(uuid2)));
|
||||
assertThat(uuid1).isEqualTo(uuid2);
|
||||
|
||||
Thread.sleep(5000);
|
||||
|
||||
String uuid3 = restTemplate.exchange(request, String.class).getBody();
|
||||
assertThat(uuid2, is(not(equalTo(uuid3))));
|
||||
assertThat(uuid2).isNotEqualTo(uuid3);
|
||||
}
|
||||
|
||||
private boolean redisServerRunning(Throwable ex) {
|
||||
|
||||
Reference in New Issue
Block a user