Polishing

This commit is contained in:
Juergen Hoeller 2017-10-27 15:28:51 +02:00
parent 0e1be82cfb
commit 78284a62e2
1 changed files with 7 additions and 5 deletions

View File

@ -241,19 +241,21 @@ public class SpelReproTests extends AbstractExpressionTests {
EvaluationContext context = TestScenarioCreator.getTestEvaluationContext();
assertFalse(propertyAccessor.canRead(context, null, "abc"));
assertFalse(propertyAccessor.canWrite(context, null, "abc"));
try {
propertyAccessor.read(context, null, "abc");
fail("Should have failed with an IllegalStateException");
}
catch (IllegalStateException ae) {
// success
catch (IllegalStateException ex) {
// expected
}
try {
propertyAccessor.write(context, null, "abc", "foo");
fail("Should have failed with an AccessEIllegalStateExceptionxception");
fail("Should have failed with an IllegalStateException");
}
catch (IllegalStateException ae) {
// success
catch (IllegalStateException ex) {
// expected
}
}