Tests that a valid property is set.
()
| 256 | * Tests that a valid property is set. |
| 257 | */ |
| 258 | @Test |
| 259 | public void testSetValue04() { |
| 260 | ArrayELResolver resolver = new ArrayELResolver(); |
| 261 | ELContext context = new StandardELContext(ELManager.getExpressionFactory()); |
| 262 | |
| 263 | String[] base = new String[] { "element" }; |
| 264 | resolver.setValue(context, base, Integer.valueOf(0), "new-element"); |
| 265 | |
| 266 | Assert.assertEquals("new-element", resolver.getValue(context, base, Integer.valueOf(0))); |
| 267 | Assert.assertTrue(context.isPropertyResolved()); |
| 268 | |
| 269 | resolver.setValue(context, base, Integer.valueOf(0), null); |
| 270 | |
| 271 | Assert.assertEquals(null, resolver.getValue(context, base, Integer.valueOf(0))); |
| 272 | Assert.assertTrue(context.isPropertyResolved()); |
| 273 | } |
| 274 | |
| 275 | /** |
| 276 | * Tests a coercion cannot be performed as the key is not integer. |
nothing calls this directly
no test coverage detected