Package org.apache.rat.document

Examples of org.apache.rat.document.MockLocation


    }


    @Before
    public final void initReporter() {
        this.subject = new MockLocation("subject");
    }
View Full Code Here


    @Test
    public void match() throws Exception {
        BufferedReader in = new BufferedReader(new StringReader(LICENSE));
        String line = in.readLine();
        boolean result = false;
        final Document subject = new MockLocation("subject");
        while (line != null) {
            result = license.match(subject, line);
            line = in.readLine();
        }
        assertTrue("OASIS license should be matched", result);
View Full Code Here

    @Test
    public void noMatch() throws Exception {
        BufferedReader in = Resources.getBufferedResourceReader("elements/Source.java");
        String line = in.readLine();
        boolean result = false;
        final Document subject = new MockLocation("subject");
        while (line != null) {
            result = license.match(subject, line);
            line = in.readLine();
        }
        assertFalse("OASIS license should not be matched", result);
View Full Code Here

        final File[] resourceFiles = Resources.getResourceFiles(directory);
        if (resourceFiles.length == 0) {
            Assert.fail("No files found under "+directory);
        }
        for(File f : resourceFiles) {
            final Document subject = new MockLocation(f.toString());
            BufferedReader br = null;
            try {
                boolean result = false;
                br = Resources.getBufferedReader(f);
                String line;
View Full Code Here


    @Before
    public final void initReporter() {
        this.reporter = new MockClaimReporter();
        this.subject = new MockLocation("subject");
    }
View Full Code Here

TOP

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

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.