Package org.apache.rat.document

Examples of org.apache.rat.document.MockDocumentMatcher


    protected void tearDown() throws Exception {
        super.tearDown();
    }

    public void testMatch() throws Exception {
        MockDocumentMatcher matcher = new MockDocumentMatcher(true);
        ConditionalAnalyser conditionalAnalyser = new ConditionalAnalyser(matcher, analyser);
        assertTrue("Returns match value", conditionalAnalyser.matches(document));
        assertEquals("Document analysed", 1, analyser.matches.size());
        assertEquals("Document analysed", document, analyser.matches.get(0));
        assertEquals("Document matched", 1, matcher.matches.size());
View Full Code Here


        assertEquals("Document matched", 1, matcher.matches.size());
        assertEquals("Document matched", document, matcher.matches.get(0));
    }

    public void testNoMatch() throws Exception {
        MockDocumentMatcher matcher = new MockDocumentMatcher(false);
        ConditionalAnalyser conditionalAnalyser = new ConditionalAnalyser(matcher, analyser);
        assertFalse("Returns match value", conditionalAnalyser.matches(document));
        assertEquals("Not Documents analysed", 0, analyser.matches.size());
        assertEquals("Document matched", 1, matcher.matches.size());
        assertEquals("Document matched", document, matcher.matches.get(0));
View Full Code Here

    MockDocumentMatcher matcher;
    MockDocument document;
   
    protected void setUp() throws Exception {
        super.setUp();
        matcher = new MockDocumentMatcher();
        negator = new MatchNegator(matcher);
        document = new MockDocument();
    }
View Full Code Here

    MockDocumentMatcher documentFour;
    MockDocument document;
   
    protected void setUp() throws Exception {
        super.setUp();
        documentOne = new MockDocumentMatcher();
        documentTwo = new MockDocumentMatcher();
        documentThree = new MockDocumentMatcher();
        documentFour = new MockDocumentMatcher();
        IDocumentMatcher[] documents = {documentOne, documentTwo, documentThree, documentFour};
        multiplexer = new DocumentMatcherMultiplexer(documents);
        document = new MockDocument();
    }
View Full Code Here

TOP

Related Classes of org.apache.rat.document.MockDocumentMatcher

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.