Tests that propertyResolved will be set to true and the corresponding listeners will be notified.
()
| 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. |
nothing calls this directly
no test coverage detected