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

Method testSetPropertyResolved

test/jakarta/el/TestELContext.java:72–90  ·  view source on GitHub ↗

Tests that propertyResolved will be set to true and the corresponding listeners will be notified.

()

Source from the content-addressed store, hash-verified

70 * Tests that propertyResolved will be set to true and the corresponding listeners will be notified.
71 */
72 @Test
73 public void testSetPropertyResolved() {
74 ELContext elContext = new TesterELContext();
75
76 TesterEvaluationListener listener = new TesterEvaluationListener();
77 elContext.addEvaluationListener(listener);
78
79 TesterBean bean = new TesterBean("test");
80
81 elContext.setPropertyResolved(bean, "name");
82
83 Assert.assertTrue(elContext.isPropertyResolved());
84
85 List<Pair> events = listener.getResolvedProperties();
86 Assert.assertEquals(1, events.size());
87 Pair p = events.get(0);
88 Assert.assertEquals(bean, p.getBase());
89 Assert.assertEquals("name", p.getProperty());
90 }
91
92 /**
93 * Tests that the corresponding listeners will be notified.

Callers

nothing calls this directly

Calls 8

getResolvedPropertiesMethod · 0.95
getBaseMethod · 0.95
getPropertyMethod · 0.95
getMethod · 0.65
addEvaluationListenerMethod · 0.45
setPropertyResolvedMethod · 0.45
isPropertyResolvedMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected