1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.rat.analysis;
21
22 import java.io.StringReader;
23
24 import junit.framework.TestCase;
25
26 import org.apache.rat.analysis.HeaderCheckWorker;
27 import org.apache.rat.analysis.license.ApacheSoftwareLicense20;
28 import org.apache.rat.api.Document;
29 import org.apache.rat.document.MockLocation;
30 import org.apache.rat.report.claim.impl.xml.MockClaimReporter;
31
32 public class HeaderCheckWorkerTest extends TestCase {
33
34 protected void setUp() throws Exception {
35 super.setUp();
36 }
37
38 protected void tearDown() throws Exception {
39 super.tearDown();
40 }
41
42 public void testIsFinished() throws Exception {
43 final Document subject = new MockLocation("subject");
44 HeaderCheckWorker worker = new HeaderCheckWorker(new StringReader(""), new ApacheSoftwareLicense20(), subject);
45 assertFalse(worker.isFinished());
46 worker.read();
47 assertTrue(worker.isFinished());
48 }
49 }