Update MockEnvironment / MockPropertySource types

Reflecting signature changes in getProperty() methods
master
Chris Beams 14 years ago
parent 3e2cc7dd19
commit c51c340881
  1. 1
      org.springframework.context/src/test/java/org/springframework/mock/env/MockEnvironment.java
  2. 4
      org.springframework.core/src/test/java/org/springframework/mock/env/MockPropertySource.java
  3. 4
      org.springframework.expression/src/test/java/org/springframework/mock/env/MockPropertySource.java
  4. 4
      org.springframework.test/src/main/java/org/springframework/mock/env/MockPropertySource.java

@ -56,4 +56,5 @@ public class MockEnvironment extends AbstractEnvironment {
this.setProperty(key, value);
return this;
}
}

@ -87,7 +87,7 @@ public class MockPropertySource extends PropertiesPropertySource {
/**
* Set the given property on the underlying {@link Properties} object.
*/
public void setProperty(String key, String value) {
public void setProperty(String key, Object value) {
this.source.put(key, value);
}
@ -96,7 +96,7 @@ public class MockPropertySource extends PropertiesPropertySource {
* Useful for method chaining and fluent-style use.
* @return this {@link MockPropertySource} instance
*/
public MockPropertySource withProperty(String key, String value) {
public MockPropertySource withProperty(String key, Object value) {
this.setProperty(key, value);
return this;
}

@ -86,7 +86,7 @@ public class MockPropertySource extends PropertiesPropertySource {
/**
* Set the given property on the underlying {@link Properties} object.
*/
public void setProperty(String key, String value) {
public void setProperty(String key, Object value) {
this.source.put(key, value);
}
@ -95,7 +95,7 @@ public class MockPropertySource extends PropertiesPropertySource {
* Useful for method chaining and fluent-style use.
* @return this {@link MockPropertySource} instance
*/
public MockPropertySource withProperty(String key, String value) {
public MockPropertySource withProperty(String key, Object value) {
this.setProperty(key, value);
return this;
}

@ -87,7 +87,7 @@ public class MockPropertySource extends PropertiesPropertySource {
/**
* Set the given property on the underlying {@link Properties} object.
*/
public void setProperty(String key, String value) {
public void setProperty(String key, Object value) {
this.source.put(key, value);
}
@ -96,7 +96,7 @@ public class MockPropertySource extends PropertiesPropertySource {
* Useful for method chaining and fluent-style use.
* @return this {@link MockPropertySource} instance
*/
public MockPropertySource withProperty(String key, String value) {
public MockPropertySource withProperty(String key, Object value) {
this.setProperty(key, value);
return this;
}

Loading…
Cancel
Save