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

Method testIsReadOnly02

test/jakarta/el/TestMapELResolver.java:164–180  ·  view source on GitHub ↗

Tests that the propertyResolved is false if base is not Map.

()

Source from the content-addressed store, hash-verified

162 * Tests that the propertyResolved is false if base is not Map.
163 */
164 @Test
165 public void testIsReadOnly02() {
166 MapELResolver mapELResolver = new MapELResolver();
167 ELContext context = new StandardELContext(ELManager.getExpressionFactory());
168
169 boolean result = mapELResolver.isReadOnly(context, new Object(), new Object());
170
171 Assert.assertFalse(result);
172 Assert.assertFalse(context.isPropertyResolved());
173
174 mapELResolver = new MapELResolver(true);
175
176 result = mapELResolver.isReadOnly(context, new Object(), new Object());
177
178 Assert.assertTrue(result);
179 Assert.assertFalse(context.isPropertyResolved());
180 }
181
182 /**
183 * Tests that if the MapELResolver is constructed with readOnly the method will return always true, otherwise false.

Callers

nothing calls this directly

Calls 3

getExpressionFactoryMethod · 0.95
isReadOnlyMethod · 0.95
isPropertyResolvedMethod · 0.45

Tested by

no test coverage detected