use of com.thoughtworks.go.config.registry.ConfigElementImplementationRegistry in project gocd by gocd.
the class FullConfigSaveNormalFlowTest method setup.
@BeforeEach
public void setup() throws Exception {
configForEdit = new BasicCruiseConfig();
updateConfigCommand = new FullConfigUpdateCommand(configForEdit, "md5");
loader = mock(MagicalGoConfigXmlLoader.class);
writer = mock(MagicalGoConfigXmlWriter.class);
document = mock(Document.class);
fileWriter = mock(GoConfigFileWriter.class);
timeProvider = mock(TimeProvider.class);
configRepository = mock(ConfigRepository.class);
cachedGoPartials = mock(CachedGoPartials.class);
configElementImplementationRegistry = mock(ConfigElementImplementationRegistry.class);
partials = new ArrayList<>();
flow = new FullConfigSaveNormalFlow(loader, writer, configElementImplementationRegistry, timeProvider, configRepository, cachedGoPartials, fileWriter);
when(writer.documentFrom(configForEdit)).thenReturn(document);
when(loader.preprocessAndValidate(configForEdit)).thenReturn(new BasicCruiseConfig());
when(writer.toString(document)).thenReturn("cruise_config");
}
Aggregations