Search in sources :

Example 6 with XSLTTransformerRegistry

use of com.thoughtworks.studios.shine.semweb.grddl.XSLTTransformerRegistry 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);
}
Also used : XSLTTransformerRegistry(com.thoughtworks.studios.shine.semweb.grddl.XSLTTransformerRegistry) InMemoryTempGraphFactory(com.thoughtworks.studios.shine.semweb.sesame.InMemoryTempGraphFactory) Before(org.junit.Before)

Example 7 with XSLTTransformerRegistry

use of com.thoughtworks.studios.shine.semweb.grddl.XSLTTransformerRegistry in project gocd by gocd.

the class JobResourceImporterTest method setup.

@Before
public void setup() {
    transformerRegistry = new XSLTTransformerRegistry();
    baseUri = "https://localhost:8154/go";
    xmlApiService = mock(XmlApiService.class);
}
Also used : XmlApiService(com.thoughtworks.go.server.service.XmlApiService) XSLTTransformerRegistry(com.thoughtworks.studios.shine.semweb.grddl.XSLTTransformerRegistry) Before(org.junit.Before)

Example 8 with XSLTTransformerRegistry

use of com.thoughtworks.studios.shine.semweb.grddl.XSLTTransformerRegistry in project gocd by gocd.

the class LazyStageGraphLoaderTest method shouldReuseTransformerAcrossSerialInvocations.

@Test
public void shouldReuseTransformerAcrossSerialInvocations() {
    StageIdentifier stageId = new StageIdentifier("pipeline-foo", 23, "stage-1", "1");
    DummyStageResourceImporter realLoader = new DummyStageResourceImporter(realGraph(), stageId, new Semaphore(2));
    LazyStageGraphLoader loader = new LazyStageGraphLoader(realLoader, stageStorage);
    loader.load(stageId);
    XSLTTransformerRegistry transformerRegistryFromFirstLoad = realLoader.transformerRegistry;
    stageStorage.clear();
    loader.load(stageId);
    XSLTTransformerRegistry transformerRegistryFromSecondLoad = realLoader.transformerRegistry;
    assertThat(transformerRegistryFromFirstLoad, sameInstance(transformerRegistryFromSecondLoad));
}
Also used : StageIdentifier(com.thoughtworks.go.domain.StageIdentifier) Semaphore(java.util.concurrent.Semaphore) XSLTTransformerRegistry(com.thoughtworks.studios.shine.semweb.grddl.XSLTTransformerRegistry) Test(org.junit.Test)

Aggregations

XSLTTransformerRegistry (com.thoughtworks.studios.shine.semweb.grddl.XSLTTransformerRegistry)8 Test (org.junit.Test)5 TestFailureSetup (com.thoughtworks.go.server.dao.sparql.TestFailureSetup)4 Date (java.util.Date)4 Graph (com.thoughtworks.studios.shine.semweb.Graph)3 Before (org.junit.Before)3 Pipeline (com.thoughtworks.go.domain.Pipeline)2 InMemoryTempGraphFactory (com.thoughtworks.studios.shine.semweb.sesame.InMemoryTempGraphFactory)2 Stage (com.thoughtworks.go.domain.Stage)1 StageIdentifier (com.thoughtworks.go.domain.StageIdentifier)1 Modification (com.thoughtworks.go.domain.materials.Modification)1 JobXmlViewModel (com.thoughtworks.go.server.domain.xml.JobXmlViewModel)1 StageXmlViewModel (com.thoughtworks.go.server.domain.xml.StageXmlViewModel)1 XmlApiService (com.thoughtworks.go.server.service.XmlApiService)1 GRDDLTransformer (com.thoughtworks.studios.shine.semweb.grddl.GRDDLTransformer)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1 Semaphore (java.util.concurrent.Semaphore)1