// =====================================================================
// Test Expectations
// =====================================================================
DefaultNamespaceMatcher matcher = new DefaultNamespaceMatcher();
MatcherResult result;
// CDM namespace should match.
matcherContextMock.expects.getNamespace()
.returns(XDIMESchemata.CDM_NAMESPACE);
result = matcher.matches(matcherContextMock);
assertEquals(result, MatcherResult.MATCHED);
// XHTML 2 namespace should match.
matcherContextMock.expects.getNamespace()
.returns(XDIMESchemata.XHTML2_NAMESPACE);
result = matcher.matches(matcherContextMock);
assertEquals(result, MatcherResult.MATCHED);
// XForms namespace should not match.
matcherContextMock.expects.getNamespace()
.returns(XDIMESchemata.XFORMS_NAMESPACE);
result = matcher.matches(matcherContextMock);
assertEquals(result, MatcherResult.FAILED);
}