Package org.richfaces.fragment.common.picker

Examples of org.richfaces.fragment.common.picker.MultipleChoicePicker


        assertEquals(Lists.newArrayList("1", "3", "5"), getStringsFromElements(elements));
    }

    @Test
    public void testPickByStyleClassOddOrEvenElements() {
        MultipleChoicePicker oddPicker = ChoicePickerHelper.byWebElement().attribute("class").contains("odd").or()
            .attribute("class").contains("even");
        List<WebElement> elements = oddPicker.pickMultiple(myFragment.getDivs());
        assertEquals(Lists.newArrayList("1", "2", "3", "4", "5", "6"), getStringsFromElements(elements));
    }
View Full Code Here


        assertEquals(Lists.newArrayList("1", "2", "3", "4", "5", "6"), getStringsFromElements(elements));
    }

    @Test
    public void testPickByStyleClassOddOrFirstOrSecondOrLastElements() {
        MultipleChoicePicker picker = ChoicePickerHelper.byWebElement().attribute("class").contains("odd").or()
            .attribute("class").contains("first").or().attribute("class").contains("second").or().attribute("class")
            .contains("last");
        List<WebElement> elements = picker.pickMultiple(myFragment.getDivs());
        assertEquals(Lists.newArrayList("1", "2", "3", "5", "6"), getStringsFromElements(elements));
    }
View Full Code Here

        assertEquals(Lists.newArrayList("1", "2", "3", "5", "6"), getStringsFromElements(elements));
    }

    @Test
    public void testPickByStyleClassOddWithoutFirstElements() {
        MultipleChoicePicker oddPicker = ChoicePickerHelper.byWebElement().attribute("class").contains("odd").and()
            .attribute("class").contains("first").not();
        List<WebElement> elements = oddPicker.pickMultiple(myFragment.getDivs());
        assertEquals(Lists.newArrayList("3", "5"), getStringsFromElements(elements));
    }
View Full Code Here

        return result;
    }

    @Test
    public void testPickByStyleClassEvenANDOddElements() {
        MultipleChoicePicker picker = ChoicePickerHelper.byWebElement().attribute("class").contains("even").and()
            .attribute("class").contains("odd");
        List<WebElement> elements = picker.pickMultiple(myFragment.getDivs());
        assertEquals(Collections.EMPTY_LIST, getStringsFromElements(elements));
    }
View Full Code Here

        assertEquals(Collections.EMPTY_LIST, getStringsFromElements(elements));
    }

    @Test
    public void testPickByStyleClassEvenElements() {
        MultipleChoicePicker evenPicker = ChoicePickerHelper.byWebElement().attribute("class").contains("even");
        List<WebElement> elements = evenPicker.pickMultiple(myFragment.getDivs());
        assertEquals(Lists.newArrayList("2", "4", "6"), getStringsFromElements(elements));
    }
View Full Code Here

        assertEquals(Lists.newArrayList("2", "4", "6"), getStringsFromElements(elements));
    }

    @Test
    public void testPickByStyleClassEvenElementsIsEqualToPickNotOdd() {
        MultipleChoicePicker evenPicker = ChoicePickerHelper.byWebElement().attribute("class").contains("even");
        MultipleChoicePicker notOddPicker = ChoicePickerHelper.byWebElement().attribute("class").contains("odd").not();
        assertEquals(Lists.newArrayList("2", "4", "6"), getStringsFromElements(evenPicker.pickMultiple(myFragment.getDivs())));
        assertEquals(Lists.newArrayList("2", "4", "6"), getStringsFromElements(notOddPicker.pickMultiple(myFragment.getDivs())));
        assertEquals(getStringsFromElements(evenPicker.pickMultiple(myFragment.getDivs())),
            getStringsFromElements(notOddPicker.pickMultiple(myFragment.getDivs())));
    }
View Full Code Here

            getStringsFromElements(notOddPicker.pickMultiple(myFragment.getDivs())));
    }

    @Test
    public void testPickByStyleClassFirstAndLastElements() {
        MultipleChoicePicker oddPicker = ChoicePickerHelper.byWebElement().attribute("class").contains("first").and()
            .attribute("class").contains("last");
        List<WebElement> elements = oddPicker.pickMultiple(myFragment.getDivs());
        assertEquals(Lists.<String>newArrayList(), getStringsFromElements(elements));
    }
View Full Code Here

        assertEquals(Lists.<String>newArrayList(), getStringsFromElements(elements));
    }

    @Test
    public void testPickByStyleClassOddElements() {
        MultipleChoicePicker oddPicker = ChoicePickerHelper.byWebElement().attribute("class").contains("odd");
        List<WebElement> elements = oddPicker.pickMultiple(myFragment.getDivs());
        assertEquals(Lists.newArrayList("1", "3", "5"), getStringsFromElements(elements));
    }
View Full Code Here

TOP

Related Classes of org.richfaces.fragment.common.picker.MultipleChoicePicker

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.