use of com.thoughtworks.go.domain.materials.scm.PluggableSCMMaterialAgent in project gocd by gocd.
the class MaterialAgentFactoryTest method shouldGetPluggableSCMMaterialAgent.
@Test
public void shouldGetPluggableSCMMaterialAgent() {
File workingDirectory = new File("/tmp/workingDirectory");
MaterialRevision revision = new MaterialRevision(new PluggableSCMMaterial(), new Modifications());
MaterialAgentFactory factory = new MaterialAgentFactory(null, workingDirectory, null, scmExtension);
MaterialAgent agent = factory.createAgent(revision);
assertThat(agent instanceof PluggableSCMMaterialAgent, is(true));
assertThat(ReflectionUtil.getField(agent, "scmExtension"), is(scmExtension));
assertThat(ReflectionUtil.getField(agent, "revision"), is(revision));
assertThat(ReflectionUtil.getField(agent, "workingDirectory"), is(workingDirectory));
}
Aggregations