parent
ee0a151671
commit
287520a810
|
|
@ -49,7 +49,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Itegration tests for the default error view.
|
* Integration tests for the default error view.
|
||||||
*
|
*
|
||||||
* @author Dave Syer
|
* @author Dave Syer
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ class OriginTrackedValue {
|
||||||
* the resulting {@link OriginTrackedValue}.
|
* the resulting {@link OriginTrackedValue}.
|
||||||
* @param value the source value
|
* @param value the source value
|
||||||
* @param origin the origin
|
* @param origin the origin
|
||||||
* @return a {@link OriginTrackedValue} or {@code null} if the source value was
|
* @return an {@link OriginTrackedValue} or {@code null} if the source value was
|
||||||
* {@code null}.
|
* {@code null}.
|
||||||
*/
|
*/
|
||||||
public static OriginTrackedValue of(Object value, PropertyOrigin origin) {
|
public static OriginTrackedValue of(Object value, PropertyOrigin origin) {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class TextResourcePropertyOrigin implements PropertyOrigin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the resource where the property originated.
|
* Return the resource where the property originated.
|
||||||
* @return the resource the text resource or {@code null}
|
* @return the text resource or {@code null}
|
||||||
*/
|
*/
|
||||||
public Resource getResource() {
|
public Resource getResource() {
|
||||||
return this.resource;
|
return this.resource;
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ public class TextResourcePropertyOriginTests {
|
||||||
Location location3 = new Location(2, 2);
|
Location location3 = new Location(2, 2);
|
||||||
assertThat(location1.hashCode()).isEqualTo(location1.hashCode());
|
assertThat(location1.hashCode()).isEqualTo(location1.hashCode());
|
||||||
assertThat(location1.hashCode()).isEqualTo(location2.hashCode());
|
assertThat(location1.hashCode()).isEqualTo(location2.hashCode());
|
||||||
|
assertThat(location1.hashCode()).isNotEqualTo(location3.hashCode());
|
||||||
assertThat(location1).isEqualTo(location1);
|
assertThat(location1).isEqualTo(location1);
|
||||||
assertThat(location1).isEqualTo(location2);
|
assertThat(location1).isEqualTo(location2);
|
||||||
assertThat(location1).isNotEqualTo(location3);
|
assertThat(location1).isNotEqualTo(location3);
|
||||||
|
|
@ -126,6 +127,8 @@ public class TextResourcePropertyOriginTests {
|
||||||
new ClassPathResource("foo2.txt"), new Location(1, 2));
|
new ClassPathResource("foo2.txt"), new Location(1, 2));
|
||||||
assertThat(origin1.hashCode()).isEqualTo(origin1.hashCode());
|
assertThat(origin1.hashCode()).isEqualTo(origin1.hashCode());
|
||||||
assertThat(origin1.hashCode()).isEqualTo(origin2.hashCode());
|
assertThat(origin1.hashCode()).isEqualTo(origin2.hashCode());
|
||||||
|
assertThat(origin1.hashCode()).isNotEqualTo(origin3.hashCode());
|
||||||
|
assertThat(origin1.hashCode()).isNotEqualTo(origin4.hashCode());
|
||||||
assertThat(origin1).isEqualTo(origin1);
|
assertThat(origin1).isEqualTo(origin1);
|
||||||
assertThat(origin1).isEqualTo(origin2);
|
assertThat(origin1).isEqualTo(origin2);
|
||||||
assertThat(origin1).isNotEqualTo(origin3);
|
assertThat(origin1).isNotEqualTo(origin3);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue