Search in sources :

Example 1 with MaterialAgent

use of com.thoughtworks.go.domain.materials.MaterialAgent in project gocd by gocd.

the class DependencyMaterialAgentTest method shouldBeCreatedByAgentFactory.

@Test
public void shouldBeCreatedByAgentFactory() {
    MaterialAgentFactory factory = new MaterialAgentFactory(ProcessOutputStreamConsumer.inMemoryConsumer(), new File("blah"), new AgentIdentifier("", "", ""), null, null);
    MaterialAgent createdAgent = factory.createAgent(materialRevision("pipeline-name", 1, "pipeline-label", "stage-name", 1));
    assertThat(createdAgent, instanceOf(DependencyMaterialAgent.class));
}
Also used : MaterialAgentFactory(com.thoughtworks.go.domain.materials.MaterialAgentFactory) AgentIdentifier(com.thoughtworks.go.remote.AgentIdentifier) MaterialAgent(com.thoughtworks.go.domain.materials.MaterialAgent) File(java.io.File) Test(org.junit.Test)

Aggregations

MaterialAgent (com.thoughtworks.go.domain.materials.MaterialAgent)1 MaterialAgentFactory (com.thoughtworks.go.domain.materials.MaterialAgentFactory)1 AgentIdentifier (com.thoughtworks.go.remote.AgentIdentifier)1 File (java.io.File)1 Test (org.junit.Test)1