Search in sources :

Example 1 with TestStreamConsumer

use of com.thoughtworks.go.helper.TestStreamConsumer in project gocd by gocd.

the class UrlBasedArtifactsRepositoryTest method setUp.

@Before
public void setUp() throws Exception {
    artifactFolder = TestFileUtil.createTempFolder("artifact_folder");
    tempFile = TestFileUtil.createTestFile(artifactFolder, "file.txt");
    console = new TestStreamConsumer();
    artifactsRepository = new UrlBasedArtifactsRepository(httpService, "http://baseurl/artifacts/", "http://baseurl/properties/", new ZipUtil());
}
Also used : ZipUtil(com.thoughtworks.go.util.ZipUtil) TestStreamConsumer(com.thoughtworks.go.helper.TestStreamConsumer) Before(org.junit.Before)

Example 2 with TestStreamConsumer

use of com.thoughtworks.go.helper.TestStreamConsumer in project gocd by gocd.

the class BuildSessionBasedTestCase method superSetup.

@Before
public void superSetup() {
    statusReporter = new BuildStateReporterStub();
    buildVariables = new HashMap<>();
    artifactsRepository = new ArtifactsRepositoryStub();
    sandbox = TestFileUtil.createTempFolder(UUID.randomUUID().toString());
    console = new TestStreamConsumer();
    httpService = new HttpServiceStub();
}
Also used : ArtifactsRepositoryStub(com.thoughtworks.go.domain.ArtifactsRepositoryStub) TestStreamConsumer(com.thoughtworks.go.helper.TestStreamConsumer) BuildStateReporterStub(com.thoughtworks.go.domain.BuildStateReporterStub) HttpServiceStub(com.thoughtworks.go.remote.work.HttpServiceStub) Before(org.junit.Before)

Aggregations

TestStreamConsumer (com.thoughtworks.go.helper.TestStreamConsumer)2 Before (org.junit.Before)2 ArtifactsRepositoryStub (com.thoughtworks.go.domain.ArtifactsRepositoryStub)1 BuildStateReporterStub (com.thoughtworks.go.domain.BuildStateReporterStub)1 HttpServiceStub (com.thoughtworks.go.remote.work.HttpServiceStub)1 ZipUtil (com.thoughtworks.go.util.ZipUtil)1