Tests that the readOnly is true always when the map is not modifiable.
()
| 204 | * Tests that the readOnly is true always when the map is not modifiable. |
| 205 | */ |
| 206 | @Test |
| 207 | public void testIsReadOnly04() { |
| 208 | MapELResolver mapELResolver = new MapELResolver(); |
| 209 | ELContext context = new StandardELContext(ELManager.getExpressionFactory()); |
| 210 | |
| 211 | Map<Object,Object> map = Collections.unmodifiableMap(new HashMap<>()); |
| 212 | boolean result = mapELResolver.isReadOnly(context, map, new Object()); |
| 213 | |
| 214 | Assert.assertTrue(result); |
| 215 | Assert.assertTrue(context.isPropertyResolved()); |
| 216 | } |
| 217 | |
| 218 | private void doNegativeTest(Object base, Object trigger, MethodUnderTest method, boolean checkResult) { |
| 219 | MapELResolver resolver = new MapELResolver(); |
nothing calls this directly
no test coverage detected