38
38
39
39
import org .junit .Rule ;
40
40
import org .junit .Test ;
41
-
42
41
import org .junit .rules .ExpectedException ;
42
+
43
43
import org .springframework .beans .InvalidPropertyException ;
44
44
import org .springframework .beans .MutablePropertyValues ;
45
45
import org .springframework .beans .NotWritablePropertyException ;
@@ -78,6 +78,7 @@ public class DataBinderTests {
78
78
@ Rule
79
79
public ExpectedException expectedException = ExpectedException .none ();
80
80
81
+
81
82
@ Test
82
83
public void testBindingNoErrors () throws Exception {
83
84
TestBean rod = new TestBean ();
@@ -1988,7 +1989,7 @@ public void testFieldErrorAccessVariations() throws Exception {
1988
1989
assertEquals ("age" , binder .getBindingResult ().getFieldError ("age" ).getField ());
1989
1990
}
1990
1991
1991
- @ Test // SPR-14888
1992
+ @ Test // SPR-14888
1992
1993
public void testSetAutoGrowCollectionLimit () {
1993
1994
BeanWithIntegerList tb = new BeanWithIntegerList ();
1994
1995
DataBinder binder = new DataBinder (tb );
@@ -2002,9 +2003,8 @@ public void testSetAutoGrowCollectionLimit() {
2002
2003
assertEquals (Integer .valueOf (1 ), binder .getBindingResult ().getFieldValue ("integerList[256]" ));
2003
2004
}
2004
2005
2005
- @ Test // SPR-14888
2006
+ @ Test // SPR-14888
2006
2007
public void testSetAutoGrowCollectionLimitAfterInitialization () {
2007
-
2008
2008
expectedException .expect (IllegalStateException .class );
2009
2009
expectedException .expectMessage ("DataBinder is already initialized - call setAutoGrowCollectionLimit before other configuration methods" );
2010
2010
@@ -2013,6 +2013,7 @@ public void testSetAutoGrowCollectionLimitAfterInitialization() {
2013
2013
binder .setAutoGrowCollectionLimit (257 );
2014
2014
}
2015
2015
2016
+
2016
2017
@ SuppressWarnings ("unused" )
2017
2018
private static class BeanWithIntegerList {
2018
2019
0 commit comments