Package fi.luomus.commons.containers

Examples of fi.luomus.commons.containers.SelectionImple.addOption()


    }
   
    public void test___size_3() {
      SelectionImple s = new SelectionImple("name");
      s.addOption(new SelectionOptionImple("A", "A", "")); // 1
      s.addOption(new SelectionOptionImple("B", "B", "")); // 2
      s.addOption(new SelectionOptionImple("C", "C", "Group 1")); // 4
      s.addOption(new SelectionOptionImple("D", "D", "Group 1")); // 5
      s.addOption(new SelectionOptionImple("E", "E", "")); // 6
      s.addOption(new SelectionOptionImple("F", "F", "")); // 7
      s.addOption(new SelectionOptionImple("G", "G", "Group 2")); // 9
View Full Code Here


   
    public void test___size_3() {
      SelectionImple s = new SelectionImple("name");
      s.addOption(new SelectionOptionImple("A", "A", "")); // 1
      s.addOption(new SelectionOptionImple("B", "B", "")); // 2
      s.addOption(new SelectionOptionImple("C", "C", "Group 1")); // 4
      s.addOption(new SelectionOptionImple("D", "D", "Group 1")); // 5
      s.addOption(new SelectionOptionImple("E", "E", "")); // 6
      s.addOption(new SelectionOptionImple("F", "F", "")); // 7
      s.addOption(new SelectionOptionImple("G", "G", "Group 2")); // 9
      assertEquals(9, s.getSize());
View Full Code Here

    public void test___size_3() {
      SelectionImple s = new SelectionImple("name");
      s.addOption(new SelectionOptionImple("A", "A", "")); // 1
      s.addOption(new SelectionOptionImple("B", "B", "")); // 2
      s.addOption(new SelectionOptionImple("C", "C", "Group 1")); // 4
      s.addOption(new SelectionOptionImple("D", "D", "Group 1")); // 5
      s.addOption(new SelectionOptionImple("E", "E", "")); // 6
      s.addOption(new SelectionOptionImple("F", "F", "")); // 7
      s.addOption(new SelectionOptionImple("G", "G", "Group 2")); // 9
      assertEquals(9, s.getSize());
    }
View Full Code Here

      SelectionImple s = new SelectionImple("name");
      s.addOption(new SelectionOptionImple("A", "A", "")); // 1
      s.addOption(new SelectionOptionImple("B", "B", "")); // 2
      s.addOption(new SelectionOptionImple("C", "C", "Group 1")); // 4
      s.addOption(new SelectionOptionImple("D", "D", "Group 1")); // 5
      s.addOption(new SelectionOptionImple("E", "E", "")); // 6
      s.addOption(new SelectionOptionImple("F", "F", "")); // 7
      s.addOption(new SelectionOptionImple("G", "G", "Group 2")); // 9
      assertEquals(9, s.getSize());
    }
   
View Full Code Here

      s.addOption(new SelectionOptionImple("A", "A", "")); // 1
      s.addOption(new SelectionOptionImple("B", "B", "")); // 2
      s.addOption(new SelectionOptionImple("C", "C", "Group 1")); // 4
      s.addOption(new SelectionOptionImple("D", "D", "Group 1")); // 5
      s.addOption(new SelectionOptionImple("E", "E", "")); // 6
      s.addOption(new SelectionOptionImple("F", "F", "")); // 7
      s.addOption(new SelectionOptionImple("G", "G", "Group 2")); // 9
      assertEquals(9, s.getSize());
    }
   
    public void test___values_are_caseinsensitive() {
View Full Code Here

      s.addOption(new SelectionOptionImple("B", "B", "")); // 2
      s.addOption(new SelectionOptionImple("C", "C", "Group 1")); // 4
      s.addOption(new SelectionOptionImple("D", "D", "Group 1")); // 5
      s.addOption(new SelectionOptionImple("E", "E", "")); // 6
      s.addOption(new SelectionOptionImple("F", "F", "")); // 7
      s.addOption(new SelectionOptionImple("G", "G", "Group 2")); // 9
      assertEquals(9, s.getSize());
    }
   
    public void test___values_are_caseinsensitive() {
      SelectionImple s = new SelectionImple("My Selection");
View Full Code Here

      assertEquals(9, s.getSize());
    }
   
    public void test___values_are_caseinsensitive() {
      SelectionImple s = new SelectionImple("My Selection");
      s.addOption(new SelectionOptionImple("value", "Desc"));
      assertEquals("Desc", s.get("value"));
      assertEquals("Desc", s.get("valUe"));
    }
   
    public void test___localization_of_description_texts() {
View Full Code Here

      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());
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.