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

Method testGetType05

test/jakarta/el/TestArrayELResolver.java:71–81  ·  view source on GitHub ↗

Tests that a result is returned even when a coercion cannot be performed.

()

Source from the content-addressed store, hash-verified

69 * Tests that a result is returned even when a coercion cannot be performed.
70 */
71 @Test
72 public void testGetType05() {
73 ArrayELResolver resolver = new ArrayELResolver();
74 ELContext context = new StandardELContext(ELManager.getExpressionFactory());
75
76 String[] base = new String[] { "element" };
77 Class<?> result = resolver.getType(context, base, "index");
78
79 Assert.assertEquals(base.getClass().getComponentType(), result);
80 Assert.assertTrue(context.isPropertyResolved());
81 }
82
83 /**
84 * Tests that a null result is returned when the base is null.

Callers

nothing calls this directly

Calls 3

getExpressionFactoryMethod · 0.95
getTypeMethod · 0.95
isPropertyResolvedMethod · 0.45

Tested by

no test coverage detected