Package org.springframework.binding.collection

Examples of org.springframework.binding.collection.MapAdaptable.asMap()


    }
  }

  private Map adapt(Object base) {
    MapAdaptable adaptable = (MapAdaptable) base;
    return adaptable.asMap();
  }

}
View Full Code Here


  public void testSetValue() {
    MapAdaptable testMap = new TestMapAdaptable();
    context.getELResolver().setValue(context, testMap, "foo", "foo");
    assertTrue(context.isPropertyResolved());
    assertEquals("foo", testMap.asMap().get("foo"));
  }

  public void testSetValue_OverWrite() {
    MapAdaptable testMap = new TestMapAdaptable();
    context.getELResolver().setValue(context, testMap, "bar", "foo");
View Full Code Here

  public void testSetValue_OverWrite() {
    MapAdaptable testMap = new TestMapAdaptable();
    context.getELResolver().setValue(context, testMap, "bar", "foo");
    assertTrue(context.isPropertyResolved());
    assertEquals("foo", testMap.asMap().get("bar"));
  }

  private class TestMapAdaptable implements MapAdaptable {
    private Map map = new HashMap();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.