MCPcopy Create free account
hub / github.com/apache/tomcat / testConvertToType02

Method testConvertToType02

test/jakarta/el/TestELContext.java:138–148  ·  view source on GitHub ↗

Tests that if there is no ELResolver the standard coercions will be invoked.

()

Source from the content-addressed store, hash-verified

136 * Tests that if there is no ELResolver the standard coercions will be invoked.
137 */
138 @Test
139 public void testConvertToType02() {
140 ELContext elContext = new TesterELContext();
141 boolean originalPropertyResolved = false;
142 elContext.setPropertyResolved(originalPropertyResolved);
143
144 Object result = elContext.convertToType("test", String.class);
145 Assert.assertEquals("test", result);
146
147 Assert.assertTrue(originalPropertyResolved == elContext.isPropertyResolved());
148 }
149
150 /**
151 * Tests that if there is ELResolver it will handle the conversion. If this resolver cannot return a result the

Callers

nothing calls this directly

Calls 3

setPropertyResolvedMethod · 0.45
convertToTypeMethod · 0.45
isPropertyResolvedMethod · 0.45

Tested by

no test coverage detected