Package fi.luomus.commons.containers

Examples of fi.luomus.commons.containers.Selection


      assertEquals("VALUE", o.getValue());
      assertEquals("description", o.getText());
    }

    public void test___selections() {
      Selection s = new SelectionImple("PESA.puulaji");
      //assertEquals("pesa.puulaji", s.getName());
      try {
        s.get("a");
        fail("Should throw exception: does not contain value");
      } catch (IllegalArgumentException e) {
        assertEquals("Selection pesa.puulaji does not define value 'a'.", e.getMessage());
      }
    }
View Full Code Here


    }

    public void test___containsValue() {
      SelectionImple s = new SelectionImple("name");
      s.addOption(new SelectionOptionImple("a", "A"));
      Selection selection = s;
      assertTrue("Should contain this option", selection.containsOption("A"));
      assertTrue("Should contain this option", selection.containsOption("a"));
      assertFalse("Should NOT contain this option", selection.containsOption("b"));
    }
View Full Code Here

TOP

Related Classes of fi.luomus.commons.containers.Selection

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.