@Override public void runTest() { ValidityReport report = testResults(); switch (expected) { case INCONSISTENT: assertTrue("expected inconsistent", !report.isValid()); break; case WARNINGS: assertTrue("expected just warnings but reports not valid", report .isValid()); assertFalse("expected warnings but reports clean", report.isClean()); break; case CLEAN: assertTrue("expected clean", report.isClean()); } if (culprit != null) { boolean foundit = false; for (Iterator<Report> i = report.getReports(); i.hasNext();) { ValidityReport.Report r = i.next(); if (r.getExtension() != null && r.getExtension().equals(culprit)) { foundit = true; break; } } if (!foundit) { assertTrue("Expcted to find a culprint " + culprit, false); } } }
@Override public void runTest() { ValidityReport report = testResults(); switch (expected) { case INCONSISTENT: assertTrue("expected inconsistent", !report.isValid()); break; case WARNINGS: assertTrue("expected just warnings but reports not valid", report .isValid()); assertFalse("expected warnings but reports clean", report.isClean()); break; case CLEAN: assertTrue("expected clean", report.isClean()); } if (culprit != null) { boolean foundit = false; for (Iterator<Report> i = report.getReports(); i.hasNext();) { ValidityReport.Report r = i.next(); if (r.getExtension() != null && r.getExtension().equals(culprit)) { foundit = true; break; } } if (!foundit) { assertTrue("Expcted to find a culprint " + culprit, false); } } }
/** * Layering one reasoner on another leads to exposed functors which * used to trip up validation */ public void testLayeredValidation() { Model ont = FileManager.get().loadModel("testing/reasoners/bugs/layeredValidation.owl"); InfModel infModel = ModelFactory.createInfModel(ReasonerRegistry.getOWLReasoner(), ont); OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RULE_INF, infModel); ValidityReport validity = model.validate(); assertTrue(validity.isClean()); }
/** * Layering one reasoner on another leads to exposed functors which * used to trip up validation */ public void testLayeredValidation() { Model ont = FileManager.get().loadModel("testing/reasoners/bugs/layeredValidation.owl"); InfModel infModel = ModelFactory.createInfModel(ReasonerRegistry.getOWLReasoner(), ont); OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RULE_INF, infModel); ValidityReport validity = model.validate(); assertTrue(validity.isClean()); }