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

Method testSetValue04

test/jakarta/el/TestMapELResolver.java:128–138  ·  view source on GitHub ↗

Tests that a valid property is set.

()

Source from the content-addressed store, hash-verified

126 * Tests that a valid property is set.
127 */
128 @Test
129 public void testSetValue04() {
130 MapELResolver mapELResolver = new MapELResolver();
131 ELContext context = new StandardELContext(ELManager.getExpressionFactory());
132
133 Map<String,String> map = new HashMap<>();
134 mapELResolver.setValue(context, map, "key", "value");
135
136 Assert.assertEquals("value", mapELResolver.getValue(context, map, "key"));
137 Assert.assertTrue(context.isPropertyResolved());
138 }
139
140 /**
141 * Tests that an exception is thrown when the map is not modifiable.

Callers

nothing calls this directly

Calls 4

getExpressionFactoryMethod · 0.95
setValueMethod · 0.95
getValueMethod · 0.95
isPropertyResolvedMethod · 0.45

Tested by

no test coverage detected