Code example for SimpleBindings

Methods: put

0
 
    private ProtectedBindings bindings;
 
    @Before 
    public void setup() { 
        SimpleBindings inner = new SimpleBindings();
        inner.put("test1", "value1");
        this.bindings = new ProtectedBindings(inner, Collections.singleton("test1"));
    } 
 
    @Test(expected=IllegalArgumentException.class)
    public void testOverwriteDisallowed() { 
        bindings.put("test1", "value2");
    } 
 
    @Test(expected=IllegalArgumentException.class)
    public void testRemoveDisallowed() { 
        bindings.remove("test1");
    } 
 
Contextual code suggestions in your IDE  Get Codota for Java