Search in sources :

Example 1 with ConfigRepoReparseListener

use of com.thoughtworks.go.config.ConfigReposMaterialParseResultManager.ConfigRepoReparseListener in project gocd by gocd.

the class ConfigReposMaterialParseResultManagerTest method shouldAddEntityConfigChangedListeners.

@Test
void shouldAddEntityConfigChangedListeners() {
    final GoConfigService goConfigService = mock(GoConfigService.class);
    manager.attachConfigUpdateListeners(goConfigService);
    final ArgumentCaptor<ConfigChangedListener> listenerArgumentCaptor = ArgumentCaptor.forClass(ConfigChangedListener.class);
    verify(goConfigService).register(listenerArgumentCaptor.capture());
    assertTrue(listenerArgumentCaptor.getValue() instanceof ConfigRepoReparseListener);
}
Also used : ConfigChangedListener(com.thoughtworks.go.listener.ConfigChangedListener) ConfigRepoReparseListener(com.thoughtworks.go.config.ConfigReposMaterialParseResultManager.ConfigRepoReparseListener) GoConfigService(com.thoughtworks.go.server.service.GoConfigService) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

ConfigRepoReparseListener (com.thoughtworks.go.config.ConfigReposMaterialParseResultManager.ConfigRepoReparseListener)1 ConfigChangedListener (com.thoughtworks.go.listener.ConfigChangedListener)1 GoConfigService (com.thoughtworks.go.server.service.GoConfigService)1 Test (org.junit.jupiter.api.Test)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1