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

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


    /**
     * Test that a null is not allowed.
     */
    public void testNullFails() {
        try {
            new NamespaceMatcher(null);
            fail("Null namespace not detected");
        } catch (IllegalArgumentException e) {
            assertEquals("Error message incorrect",
                         "namespace cannot be null",
                         e.getMessage());
View Full Code Here


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

        Matcher matcher = new NamespaceMatcher("xyz");
        MatcherResult actual = matcher.matches(matcherContextMock);
        assertEquals("Wrong result", MatcherResult.MATCHED, actual);
    }
View Full Code Here

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

        Matcher matcher = new NamespaceMatcher("abc");
        MatcherResult actual = matcher.matches(matcherContextMock);
        assertEquals("Wrong result", MatcherResult.FAILED, actual);
    }
View Full Code Here

        PREFIX_2_NS_MATCHER = map;
    }

    private static void addNamespaceMatcher(
            final Map map, final String prefix, final String namespace) {
        map.put(prefix, new NamespaceMatcher(namespace));
    }
View Full Code Here

TOP

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

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.