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

Examples of com.volantis.styling.impl.engine.matchers.Matcher.matches()


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

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

    /**
     * Test that it invokes the constraintMock properly and returns the correct
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

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

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

    /**
     * Test that it matches the current elements local name.
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

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

        Matcher matcher = new LocalNameMatcher("xyz");
        MatcherResult actual = matcher.matches(matcherContextMock);
        assertEquals("Wrong result", MatcherResult.MATCHED, actual);
    }

    /**
     * Test that it matches the current elements local name.
View Full Code Here

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

        Matcher matcher = new LocalNameMatcher("abc");
        MatcherResult actual = matcher.matches(matcherContextMock);
        assertEquals("Wrong result", MatcherResult.FAILED, actual);
    }
}

/*
 
View Full Code Here

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

                Matcher matcher = new NthChildMatcher(a, b);
                MatcherResult actual = matcher.matches(matcherContextMock);
                assertEquals("Wrong result for position " + p +
                             " within sequence " + sequence + " with " +
                             a + "n + " + b,
                             sequence.expectedResult, actual);
            }
View Full Code Here

    private void checkNamespaceMapping(
            final MatcherContextMock contextMock, final String namespacePrefix,
            final String namespaceURI) {
        contextMock.expects.getNamespace().returns(namespaceURI);
        Matcher matcher = factory.createNamespaceMatcher(namespacePrefix);
        MatcherResult result = matcher.matches(contextMock);
        assertEquals(MatcherResult.MATCHED, result);
    }
}
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.