Package org.apache.rat.report.claim.impl.xml.MockClaimReporter

Examples of org.apache.rat.report.claim.impl.xml.MockClaimReporter.Claim


    public void testAnalyseLiteral() throws Exception {
        analyser = new ConstantClaimAnalyser(reporter, PREDICATE, OBJECT, true);
        MockDocument document = new MockDocument();
        analyser.analyse(document);
        assertEquals("One claim per document", 1, reporter.claims.size());
        Claim claim = reporter.getClaim(0);
        assertEquals("Subject is name", document.name, claim.subject);
        assertEquals("Object is constant", OBJECT, claim.object);
        assertEquals("Predicate is constant", PREDICATE, claim.predicate);
        assertTrue("Constantly literal", claim.isLiteral);
        document.name = "A New Name";
View Full Code Here


    public void testAnalyseNotLiteral() throws Exception {
        analyser = new ConstantClaimAnalyser(reporter, PREDICATE, OBJECT, false);
        MockDocument document = new MockDocument();
        analyser.analyse(document);
        assertEquals("One claim per document", 1, reporter.claims.size());
        Claim claim = reporter.getClaim(0);
        assertEquals("Subject is name", document.name, claim.subject);
        assertEquals("Object is constant", OBJECT, claim.object);
        assertEquals("Predicate is constant", PREDICATE, claim.predicate);
        assertFalse("Constantly not literal", claim.isLiteral);
        document.name = "A New Name";
View Full Code Here

TOP

Related Classes of org.apache.rat.report.claim.impl.xml.MockClaimReporter.Claim

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.