use of com.thoughtworks.go.plugin.access.pluggabletask.TaskExtension in project gocd by gocd.
the class PluggableTaskServiceTest method setUp.
@BeforeEach
public void setUp() throws Exception {
taskExtension = mock(TaskExtension.class);
pluggableTaskService = new PluggableTaskService(taskExtension);
final TaskPreference preference = mock(TaskPreference.class);
final TaskConfig taskConfig = new TaskConfig();
final TaskConfigProperty key1 = taskConfig.addProperty("KEY1");
key1.with(Property.REQUIRED, true);
taskConfig.addProperty("KEY2");
when(preference.getConfig()).thenReturn(taskConfig);
PluggableTaskConfigStore.store().setPreferenceFor(pluginId, preference);
}
use of com.thoughtworks.go.plugin.access.pluggabletask.TaskExtension in project gocd by gocd.
the class PluggableTaskBuilderTest method setUp.
@BeforeEach
public void setUp() {
PluginManagerReference.reference().setPluginManager(pluginManager);
when(pluggableTask.getPluginConfiguration()).thenReturn(new PluginConfiguration(TEST_PLUGIN_ID, "1.0"));
HashMap<String, Map<String, String>> pluginConfig = new HashMap<>();
when(pluggableTask.configAsMap()).thenReturn(pluginConfig);
taskExtension = new TaskExtension(pluginManager, extensionsRegistry);
}
Aggregations