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

Method testGetType03

test/jakarta/el/TestArrayELResolver.java:44–54  ·  view source on GitHub ↗

Tests that a valid property is resolved.

()

Source from the content-addressed store, hash-verified

42 * Tests that a valid property is resolved.
43 */
44 @Test
45 public void testGetType03() {
46 ArrayELResolver resolver = new ArrayELResolver();
47 ELContext context = new StandardELContext(ELManager.getExpressionFactory());
48
49 String[] base = new String[] { "element" };
50 Class<?> result = resolver.getType(context, base, Integer.valueOf(0));
51
52 Assert.assertEquals(base.getClass().getComponentType(), result);
53 Assert.assertTrue(context.isPropertyResolved());
54 }
55
56 /**
57 * Tests that the key is out of bounds and exception will be thrown.

Callers

nothing calls this directly

Calls 4

getExpressionFactoryMethod · 0.95
getTypeMethod · 0.95
valueOfMethod · 0.45
isPropertyResolvedMethod · 0.45

Tested by

no test coverage detected