MCPcopy Index your code
hub / github.com/apache/tomcat / testSetValue06

Method testSetValue06

test/jakarta/el/TestArrayELResolver.java:290–297  ·  view source on GitHub ↗

Tests that the key is out of bounds and exception will be thrown.

()

Source from the content-addressed store, hash-verified

288 * Tests that the key is out of bounds and exception will be thrown.
289 */
290 @Test(expected = PropertyNotFoundException.class)
291 public void testSetValue06() {
292 ArrayELResolver resolver = new ArrayELResolver();
293 ELContext context = new StandardELContext(ELManager.getExpressionFactory());
294
295 String[] base = new String[] { "element" };
296 resolver.setValue(context, base, Integer.valueOf(1), "new-element");
297 }
298
299 /**
300 * Tests that an exception will be thrown if the value is not from the corresponding type.

Callers

nothing calls this directly

Calls 3

getExpressionFactoryMethod · 0.95
setValueMethod · 0.95
valueOfMethod · 0.45

Tested by

no test coverage detected