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

Examples of com.volantis.styling.impl.engine.matchers.AttributeMatcher


     */
    public void testNullLocalNameFails() {
        try {
            ValueConstraint constraint = new ValueConstraintMock(
                    "constraintMock", expectations);
            new AttributeMatcher(null, null, constraint);
            fail("Null localName not detected");
        } catch (IllegalArgumentException e) {
            assertEquals("Error message incorrect",
                         "localName cannot be null",
                         e.getMessage());
View Full Code Here


    /**
     * Test that a null constraintMock fails.
     */
    public void testNullConstraintFails() {
        try {
            new AttributeMatcher(null, "fred", null);
            fail("Null constraintMock not detected");
        } catch (IllegalArgumentException e) {
            assertEquals("Error message incorrect",
                         "constraint cannot be null",
                         e.getMessage());
View Full Code Here

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        Matcher matcher = new AttributeMatcher(null, "local", constraintMock);
        MatcherResult actual = matcher.matches(matcherContextMock);
        assertEquals("Wrong result", MatcherResult.MATCHED, actual);
    }
View Full Code Here

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        Matcher matcher = new AttributeMatcher(null, "local", constraintMock);
        MatcherResult actual = matcher.matches(matcherContextMock);
        assertEquals("Wrong result", MatcherResult.FAILED, actual);
    }
View Full Code Here

    }

    // Javadoc inherited.
    public SimpleMatcher createAttributeMatcher(String prefix, String localName,
                                                ValueConstraint constraint) {
        return new AttributeMatcher(prefix, localName, constraint);
    }
View Full Code Here

TOP

Related Classes of com.volantis.styling.impl.engine.matchers.AttributeMatcher

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.