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