Examples of satisfied()


Examples of com.volantis.styling.impl.engine.matchers.constraints.ListContains.satisfied()

     * Test that a value that is the only word in the list succeeds.
     */
    public void testOnlyWord() {
        ValueConstraint constraint = new ListContains("alpha");
        assertTrue("Only word did not match",
                   constraint.satisfied("alpha"));
    }

    /**
     * Test that a value that is the first word in the list succeeds.
     */
 
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.constraints.ListContains.satisfied()

     * Test that a value that is the first word in the list succeeds.
     */
    public void testFirstWord() {
        ValueConstraint constraint = new ListContains("alpha");
        assertTrue("First word did not match",
                   constraint.satisfied("alpha beta gamma"));
    }

    /**
     * Test that a value that is the middle word in the list succeeds.
     */
 
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.constraints.ListContains.satisfied()

     * Test that a value that is the middle word in the list succeeds.
     */
    public void testMiddleWord() {
        ValueConstraint constraint = new ListContains("beta");
        assertTrue("Middle word did not match",
                   constraint.satisfied("alpha beta gamma"));
    }

    /**
     * Test that a value that is the last word in the list succeeds.
     */
 
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.constraints.ListContains.satisfied()

     * Test that a value that is the last word in the list succeeds.
     */
    public void testLastWord() {
        ValueConstraint constraint = new ListContains("gamma");
        assertTrue("Last word did not match",
                   constraint.satisfied("alpha beta gamma"));
    }

    /**
     * Test that a value that is a suffix of an item works.
     */
 
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.constraints.ListContains.satisfied()

     * Test that a value that is a suffix of an item works.
     */
    public void testWordSuffix() {
        ValueConstraint constraint = new ListContains("eta");
        assertFalse("Suffix matched",
                    constraint.satisfied("alpha beta gamma"));
    }

    /**
     * Test that a value that is a prefix of an item works.
     */
 
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.constraints.ListContains.satisfied()

     * Test that a value that is a prefix of an item works.
     */
    public void testWordPrefix() {
        ValueConstraint constraint = new ListContains("bet");
        assertFalse("Prefix matched",
                    constraint.satisfied("alpha beta gamma"));
    }

    /**
     * Test that a value that is not in the list works.
     */
 
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.constraints.ListContains.satisfied()

     * Test that a value that is not in the list works.
     */
    public void testMismatchWord() {
        ValueConstraint constraint = new ListContains("epsilon");
        assertFalse("Mismatch word matched",
                    constraint.satisfied("alpha beta gamma"));
    }
}

/*
===========================================================================
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.constraints.ValueConstraint.satisfied()

     * Test that it matches the prefix of a language code.
     */
    public void testMatchesLanguagePrefix() {
        ValueConstraint constraint = createConstraint("abc");
        assertTrue("Language string did not match",
                constraint.satisfied("abc"));
        assertTrue("Language string did not match",
                   constraint.satisfied("abc-"));
        assertTrue("Language string did not match",
                constraint.satisfied("abc-def"));
        assertFalse("Language string should not match",
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.constraints.ValueConstraint.satisfied()

    public void testMatchesLanguagePrefix() {
        ValueConstraint constraint = createConstraint("abc");
        assertTrue("Language string did not match",
                constraint.satisfied("abc"));
        assertTrue("Language string did not match",
                   constraint.satisfied("abc-"));
        assertTrue("Language string did not match",
                constraint.satisfied("abc-def"));
        assertFalse("Language string should not match",
                constraint.satisfied("abcdef"));
        assertFalse("Language string should not match",
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.constraints.ValueConstraint.satisfied()

        assertTrue("Language string did not match",
                constraint.satisfied("abc"));
        assertTrue("Language string did not match",
                   constraint.satisfied("abc-"));
        assertTrue("Language string did not match",
                constraint.satisfied("abc-def"));
        assertFalse("Language string should not match",
                constraint.satisfied("abcdef"));
        assertFalse("Language string should not match",
                constraint.satisfied("ab"));
        assertFalse("Language string should not match",
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.