Add missing fail calls. Errors would be silently ignored if those calls are missing.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1619994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2014-08-23 09:30:12 +00:00
parent 84c43fee7b
commit 092d6da566
1 changed files with 2 additions and 0 deletions

View File

@ -1084,12 +1084,14 @@ public class FieldUtilsTest {
field = parentClass.getDeclaredField("i");
try {
FieldUtils.writeField(field, publicChild, Integer.valueOf(Integer.MAX_VALUE));
fail("Expected IllegalAccessException");
} catch (final IllegalAccessException e) {
// pass
}
field = parentClass.getDeclaredField("d");
try {
FieldUtils.writeField(field, publicChild, Double.valueOf(Double.MAX_VALUE));
fail("Expected IllegalAccessException");
} catch (final IllegalAccessException e) {
// pass
}