Package fi.luomus.commons.containers

Examples of fi.luomus.commons.containers.SelectionOptionImple


      assertEquals("Desc", s.get("valUe"));
    }
   
    public void test___localization_of_description_texts() {
      SelectionImple s = new SelectionImple("My Selection");
      s.addOption(new SelectionOptionImple("value", "Default desc").setText("fi", "Suomi desc"));
      assertEquals("Default desc", s.get("value"));
      assertEquals("Default desc", s.get("value", "en"));
      assertEquals("Default desc", s.get("value", "EN"));
      assertEquals("Default desc", s.get("value", null));
      assertEquals("Suomi desc", s.get("VALUE", "fi"));
View Full Code Here


      assertEquals("Suomi desc", s.get("VALUE", "FI"));
    }
   
    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"));
View Full Code Here

      assertEquals("Minun optgrouppi", o.getGroup("FI"));
    }
   
    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"));
View Full Code Here

  }

  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

TOP

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

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.