Package com.volantis.styling.impl.engine.matchers.constraints

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


     * 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

     * 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

     * 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

     * 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

     * 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

     * 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

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.