use of com.thoughtworks.go.server.service.materials.PackageDefinitionService in project gocd by gocd.
the class PackageDefinitionCreatorTest method setup.
@Before
public void setup() {
packageDefinitionService = mock(PackageDefinitionService.class);
doNothing().when(packageDefinitionService).performPluginValidationsFor(any(PackageDefinition.class));
cruiseConfig = mock(BasicCruiseConfig.class);
packageRepository = PackageRepositoryMother.create(repoId);
packageDefinition = PackageDefinitionMother.create(pkgId);
packageRepository.addPackage(packageDefinition);
when(cruiseConfig.getPackageRepositories()).thenReturn(new PackageRepositories(packageRepository));
doNothing().when(cruiseConfig).savePackageDefinition(any(PackageDefinition.class));
}
Aggregations