Examples of MockLocation


Examples of eu.admire.dispel.engine.MockLocation

    }

    protected void setUp() throws Exception
    {
        super.setUp();
        mLocation = new MockLocation("location");   
    }
View Full Code Here

Examples of eu.admire.dispel.engine.MockLocation

        assertTrue(names.isEmpty());
    }
   
    public void testTwoWorkflows() throws Exception
    {
        Location location1 = new MockLocation("A");
        Location location2 = new MockLocation("B");
        ProcessingElementNode node1 = new ProcessingElementNode("1");
        node1.addAnnotation(AnnotationKeys.LOCATION, location1);
        ProcessingElementNode node2 = new ProcessingElementNode("2");
        node2.addAnnotation(AnnotationKeys.LOCATION, location1);
        ProcessingElementNode node3 = new ProcessingElementNode("3");
View Full Code Here

Examples of org.apache.rat.document.MockLocation

    }

    public void testMatcherLine() throws Exception {
        matcherOne.result = false;
        matcherTwo.result = false;
        final Document subject = new MockLocation("subject");
        multiplexer.match(subject, LINE_ONE);
        assertEquals("One line", 1, matcherOne.lines.size());
        assertEquals("Same as line passed", LINE_ONE, matcherOne.lines.get(0));
        assertEquals("One line", 1, matcherTwo.lines.size());
        assertEquals("Same as line passed", LINE_ONE, matcherTwo.lines.get(0));
View Full Code Here

Examples of org.apache.rat.document.MockLocation

    boolean readAndMatch(String name) throws Exception {
        File file = Resources.getResourceFile("javadocs/" + name);
        boolean result = false;
        BufferedReader in = new BufferedReader(new FileReader(file));
        String line = in.readLine();
        final Document subject = new MockLocation("subject");
        while (line != null && !result) {
            result = license.match(subject, line);
            line = in.readLine();
        }
        return result;
View Full Code Here

Examples of org.apache.rat.document.MockLocation

    @Test
    public void match() throws Exception {
        BufferedReader in = new BufferedReader(new StringReader(HEADER));
        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("Applied ASL2.0 license should be matched", result);
View Full Code Here

Examples of org.apache.rat.document.MockLocation

    @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("Applied ASL2.0 license should not be matched", result);
View Full Code Here

Examples of org.apache.rat.document.MockLocation

    @Before
    public void setUp() throws Exception {
        reporter = new MockClaimReporter();
        policy = new DefaultPolicy();
        subject = new MockLocation("subject");
    }
View Full Code Here

Examples of org.apache.rat.document.MockLocation

    @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

Examples of org.apache.rat.document.MockLocation

    @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

Examples of org.apache.rat.document.MockLocation

  protected void tearDown() throws Exception {
    super.tearDown();
  }
 
  public void testIsFinished() throws Exception {
        final Document subject = new MockLocation("subject");
    HeaderCheckWorker worker = new HeaderCheckWorker(new StringReader(""), new ApacheSoftwareLicense20(), subject);
    assertFalse(worker.isFinished());
    worker.read();
    assertTrue(worker.isFinished());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.