Merge branch '2.0.x'
This commit is contained in:
commit
bdf028a2e6
|
@ -17,10 +17,7 @@
|
||||||
package org.springframework.boot.autoconfigure.data.rest;
|
package org.springframework.boot.autoconfigure.data.rest;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -145,13 +142,6 @@ public class RepositoryRestMvcAutoConfigurationTests {
|
||||||
assertThat(bean.getBaseUri()).isEqualTo(URI.create(""));
|
assertThat(bean.getBaseUri()).isEqualTo(URI.create(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void assertThatDateIsFormattedCorrectly(String beanName)
|
|
||||||
throws JsonProcessingException {
|
|
||||||
ObjectMapper objectMapper = this.context.getBean(beanName, ObjectMapper.class);
|
|
||||||
assertThat(objectMapper.writeValueAsString(new Date(1413387983267L)))
|
|
||||||
.isEqualTo("\"2014-10\"");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void load(Class<?> config, String... environment) {
|
private void load(Class<?> config, String... environment) {
|
||||||
AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext();
|
AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext();
|
||||||
applicationContext.setServletContext(new MockServletContext());
|
applicationContext.setServletContext(new MockServletContext());
|
||||||
|
|
Loading…
Reference in New Issue