Package fi.luomus.commons.containers.Selection

Examples of fi.luomus.commons.containers.Selection.SelectionOption


  }

  public static class WhenCreatingAndUsingSelections extends TestCase {

    public void test___options() {
      SelectionOption o = new SelectionOptionImple("value", "description");
      assertEquals("VALUE", o.getValue());
      assertEquals("description", o.getText());
    }
View Full Code Here


   
    public void test___localization_of_optgroups() {
      SelectionImple s = new SelectionImple("My Selection");
      s.addOption(new SelectionOptionImple("value", "Default desc", "My optgroup").setText("fi", "Suomi desc").setGroup("fi", "Minun optgrouppi"));
     
      SelectionOption o = s.getOption("value");
     
      assertEquals("My optgroup", o.getGroup());
      assertEquals("My optgroup", o.getGroup("en"));
      assertEquals("My optgroup", o.getGroup("EN"));
      assertEquals("My optgroup", o.getGroup(null));
      assertEquals("Minun optgrouppi", o.getGroup("fi"));
      assertEquals("Minun optgrouppi", o.getGroup("FI"));
    }
View Full Code Here

    public void test___localization_of_optgroups_2() {
      SelectionImple s = new SelectionImple("My Selection");
      s.addOption(new SelectionOptionImple("value", "Default desc", "My optgroup").setText("fi", "Suomi desc").setGroup("fi", "Minun optgrouppi"));
      s.addOption(new SelectionOptionImple("othervalue", "Other desc"));
     
      SelectionOption o = s.getOption("othervalue");
     
      assertEquals("", o.getGroup());
      assertEquals("", o.getGroup("en"));
      assertEquals("", o.getGroup("EN"));
      assertEquals("", o.getGroup(null));
      assertEquals("", o.getGroup("fi"));
      assertEquals("", o.getGroup("FI"));
    }
View Full Code Here

TOP

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

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.