Package ch.miranet.commons.container

Examples of ch.miranet.commons.container.FeatureMap


public class FeatureMapTest {
 
  @Test
  public void testMap() {
    final FeatureMap map = new FeatureMap();
   
    map.putFeature(Name.First, "Homer");
    map.putFeature(Name.Last,  "Simpson");   
   
    assert map.getFeature(Name.First).equals("Homer");
    assert map.getFeature(Name.Last).equals("Simpson");
   
    assert map.getFeatureKeys().size() == 2;
    assert map.getFeatureKeys().contains(Name.First);
    assert map.getFeatureKeys().contains(Name.Last);
   
   
    assert map.removeFeature(Name.First).equals("Homer");
    assert map.getFeature(Name.First) == null;
    assert map.getFeatureKeys().size() == 1;
    assert map.getFeatureKeys().contains(Name.Last);
  }
View Full Code Here

TOP

Related Classes of ch.miranet.commons.container.FeatureMap

Copyright © 2018 www.massapicom. 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.