Package com.clarkparsia.pellint.test.lintpattern

Examples of com.clarkparsia.pellint.test.lintpattern.MockLintPattern


  private LintPattern m_MockPattern;
 
  @Before
  public void setUp() throws OWLOntologyCreationException {
    super.setUp();
    m_MockPattern = new MockLintPattern();
  }
View Full Code Here


    assertSame(m_Ontology, ontologyLints.getOntology());
    assertTrue(ontologyLints.isEmpty());
    assertEquals(0, ontologyLints.size());
   
    MockLint lint = new MockLint();
    MockLintPattern pattern1 = new MockLintPattern(false);
    ontologyLints.addLint(pattern1, lint);
    assertFalse(ontologyLints.isEmpty());
    assertEquals(1, ontologyLints.size());
   
    MockLintPattern pattern2 = new MockLintPattern(true);
    List<Lint> lints = Arrays.<Lint>asList(new MockLint(), new MockLint(), new MockLint());
    ontologyLints.addLints(pattern2, lints);
    assertFalse(ontologyLints.isEmpty());
    assertEquals(1 + lints.size(), ontologyLints.size());
  }
View Full Code Here

  @Test
  public void testApplyFix() throws OWLOntologyChangeException {
    OntologyLints ontologyLints = new OntologyLints(m_Ontology);
   
    MockLint unfixableLint = new MockLint();
    MockLintPattern unfixablePattern = new MockLintPattern(false);
    ontologyLints.addLint(unfixablePattern, unfixableLint);
    MockLintPattern fixablePattern = new MockLintPattern(true);
    List<Lint> lints = Arrays.<Lint>asList(new MockLint(), new MockLint(), new MockLint());
    ontologyLints.addLints(fixablePattern, lints);
   
    assertEquals(Collections.singleton( unfixableLint ), ontologyLints.applyFix(m_Manager));
  }
View Full Code Here

    assertSame(m_Ontology, ontologyLints.getOntology());
    assertTrue(ontologyLints.isEmpty());
    assertEquals(0, ontologyLints.size());
   
    MockLint lint = new MockLint();
    MockLintPattern pattern1 = new MockLintPattern(false);
    ontologyLints.addLint(pattern1, lint);
    assertFalse(ontologyLints.isEmpty());
    assertEquals(1, ontologyLints.size());
   
    MockLintPattern pattern2 = new MockLintPattern(true);
    List<Lint> lints = Arrays.<Lint>asList(new MockLint(), new MockLint(), new MockLint());
    ontologyLints.addLints(pattern2, lints);
    assertFalse(ontologyLints.isEmpty());
    assertEquals(1 + lints.size(), ontologyLints.size());
  }
View Full Code Here

  @Test
  public void testApplyFix() {
    OntologyLints ontologyLints = new OntologyLints(m_Ontology);
   
    MockLint unfixableLint = new MockLint();
    MockLintPattern unfixablePattern = new MockLintPattern(false);
    ontologyLints.addLint(unfixablePattern, unfixableLint);
    MockLintPattern fixablePattern = new MockLintPattern(true);
    List<Lint> lints = Arrays.<Lint>asList(new MockLint(), new MockLint(), new MockLint());
    ontologyLints.addLints(fixablePattern, lints);
   
    assertEquals(Collections.singleton( unfixableLint ), ontologyLints.applyFix(m_Manager));
  }
View Full Code Here

  private LintPattern m_MockPattern;
 
  @Before
  public void setUp() throws OWLOntologyCreationException {
    super.setUp();
    m_MockPattern = new MockLintPattern();
  }
View Full Code Here

TOP

Related Classes of com.clarkparsia.pellint.test.lintpattern.MockLintPattern

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.