Polishing
Issue: SPR-14888
This commit is contained in:
@@ -38,8 +38,8 @@ import java.util.TreeSet;
|
|||||||
|
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.junit.rules.ExpectedException;
|
import org.junit.rules.ExpectedException;
|
||||||
|
|
||||||
import org.springframework.beans.InvalidPropertyException;
|
import org.springframework.beans.InvalidPropertyException;
|
||||||
import org.springframework.beans.MutablePropertyValues;
|
import org.springframework.beans.MutablePropertyValues;
|
||||||
import org.springframework.beans.NotWritablePropertyException;
|
import org.springframework.beans.NotWritablePropertyException;
|
||||||
@@ -78,6 +78,7 @@ public class DataBinderTests {
|
|||||||
@Rule
|
@Rule
|
||||||
public ExpectedException expectedException = ExpectedException.none();
|
public ExpectedException expectedException = ExpectedException.none();
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBindingNoErrors() throws Exception {
|
public void testBindingNoErrors() throws Exception {
|
||||||
TestBean rod = new TestBean();
|
TestBean rod = new TestBean();
|
||||||
@@ -1988,7 +1989,7 @@ public class DataBinderTests {
|
|||||||
assertEquals("age", binder.getBindingResult().getFieldError("age").getField());
|
assertEquals("age", binder.getBindingResult().getFieldError("age").getField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test // SPR-14888
|
@Test // SPR-14888
|
||||||
public void testSetAutoGrowCollectionLimit() {
|
public void testSetAutoGrowCollectionLimit() {
|
||||||
BeanWithIntegerList tb = new BeanWithIntegerList();
|
BeanWithIntegerList tb = new BeanWithIntegerList();
|
||||||
DataBinder binder = new DataBinder(tb);
|
DataBinder binder = new DataBinder(tb);
|
||||||
@@ -2002,9 +2003,8 @@ public class DataBinderTests {
|
|||||||
assertEquals(Integer.valueOf(1), binder.getBindingResult().getFieldValue("integerList[256]"));
|
assertEquals(Integer.valueOf(1), binder.getBindingResult().getFieldValue("integerList[256]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test // SPR-14888
|
@Test // SPR-14888
|
||||||
public void testSetAutoGrowCollectionLimitAfterInitialization() {
|
public void testSetAutoGrowCollectionLimitAfterInitialization() {
|
||||||
|
|
||||||
expectedException.expect(IllegalStateException.class);
|
expectedException.expect(IllegalStateException.class);
|
||||||
expectedException.expectMessage("DataBinder is already initialized - call setAutoGrowCollectionLimit before other configuration methods");
|
expectedException.expectMessage("DataBinder is already initialized - call setAutoGrowCollectionLimit before other configuration methods");
|
||||||
|
|
||||||
@@ -2013,6 +2013,7 @@ public class DataBinderTests {
|
|||||||
binder.setAutoGrowCollectionLimit(257);
|
binder.setAutoGrowCollectionLimit(257);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private static class BeanWithIntegerList {
|
private static class BeanWithIntegerList {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user