use of com.thoughtworks.studios.shine.semweb.sesame.InMemoryTempGraphFactory in project gocd by gocd.
the class AntJUnitReportRDFizerForRailsTestsReportTest method canReadRailsTestWithErrorOutput.
@Test
public void canReadRailsTestWithErrorOutput() throws Exception {
AntJUnitReportRDFizer junitRDFizer = new AntJUnitReportRDFizer(new InMemoryTempGraphFactory(), XSLTTransformerRegistry);
Graph graph = junitRDFizer.importFile("http://job", document(FileUtils.readFileToString(new File("src/test-shared/resources/ruby_xunit/errors/TEST-PostsControllerTest.xml"), UTF_8)));
String ask = "prefix cruise: <" + GoOntology.URI + "> " + "PREFIX xunit: <" + XUnitOntology.URI + "> " + "prefix xsd: <http://www.w3.org/2001/XMLSchema#> " + "ASK WHERE { " + "<http://job> xunit:hasTestCase _:testCase . " + "_:testCase a xunit:TestCase . " + "_:testCase xunit:testSuiteName 'PostsControllerTest'^^xsd:string . " + "_:testCase xunit:testCaseName 'test_should_get_index'^^xsd:string . " + "_:testCase xunit:hasFailure _:failure . " + "_:failure xunit:isError 'true'^^xsd:boolean " + "}";
assertAskIsTrue(graph, ask);
}
use of com.thoughtworks.studios.shine.semweb.sesame.InMemoryTempGraphFactory in project gocd by gocd.
the class AntJUnitReportRDFizerForTwistReportTest method canReadACombinedTestReport.
@Test
public void canReadACombinedTestReport() throws Exception {
AntJUnitReportRDFizer junitRDFizer = new AntJUnitReportRDFizer(new InMemoryTempGraphFactory(), XSLTTransformerRegistry);
Graph graph = junitRDFizer.importFile("http://job", document(FileUtils.readFileToString(new File("src/test-shared/resources/twist_xunit/TESTS-TestSuites.xml"), UTF_8)));
String ask = "prefix cruise: <" + GoOntology.URI + "> " + "PREFIX xunit: <" + XUnitOntology.URI + "> " + "prefix xsd: <http://www.w3.org/2001/XMLSchema#> " + "ASK WHERE { " + "<http://job> xunit:hasTestCase _:testCase . " + "_:testCase a xunit:TestCase . " + "_:testCase xunit:testSuiteName 'scn'^^xsd:string . " + "_:testCase xunit:testCaseName 'Parameter type matching in data table.scn'^^xsd:string . " + "_:testCase xunit:hasFailure _:failure . " + "_:failure xunit:isError 'false'^^xsd:boolean " + "}";
assertAskIsTrue(graph, ask);
}
use of com.thoughtworks.studios.shine.semweb.sesame.InMemoryTempGraphFactory in project gocd by gocd.
the class AntJUnitReportRDFizerTest method testDoesHandleJUnitXMLFile.
@Test
public void testDoesHandleJUnitXMLFile() throws DocumentException {
String invalidXML = "<?xml version='1.0' encoding='UTF-8' ?><testsuite/>";
AntJUnitReportRDFizer junitRDFizer = new AntJUnitReportRDFizer(new InMemoryTempGraphFactory(), XSLTTransformerRegistry);
assertTrue(junitRDFizer.canHandle(document(invalidXML)));
}
use of com.thoughtworks.studios.shine.semweb.sesame.InMemoryTempGraphFactory in project gocd by gocd.
the class NUnitRDFizerTest method setup.
@Before
public void setup() {
XSLTTransformerRegistry transformerRegistry = new XSLTTransformerRegistry();
AntJUnitReportRDFizer jUnitRDFizer = new AntJUnitReportRDFizer(new InMemoryTempGraphFactory(), transformerRegistry);
nUnitRDFizer = new NUnitRDFizer(jUnitRDFizer, transformerRegistry);
}
use of com.thoughtworks.studios.shine.semweb.sesame.InMemoryTempGraphFactory in project gocd by gocd.
the class GoGRDDLResourceRDFizerTest method testCanHandleAcceptsCorrectRootElement.
@Test
public void testCanHandleAcceptsCorrectRootElement() throws DocumentException {
GoGRDDLResourceRDFizer rdfizer = new GoGRDDLResourceRDFizer("job", "cruise/job-grddl.xsl", new InMemoryTempGraphFactory(), XSLTTransformerRegistry, null);
assertTrue(rdfizer.canHandle(doc("<job />")));
assertFalse(rdfizer.canHandle(doc("<stage />")));
}
Aggregations