use of org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService in project openflowplugin by opendaylight.
the class FRMTest method getConfigurationService.
public ConfigurationService getConfigurationService() {
final ConfigurationService configurationService = Mockito.mock(ConfigurationService.class);
final ForwardingRulesManagerConfig config = getConfig();
Mockito.when(configurationService.registerListener(Mockito.any())).thenReturn(() -> {
});
Mockito.when(configurationService.getProperty(Mockito.eq("disable-reconciliation"), Mockito.any())).thenReturn(config.isDisableReconciliation());
Mockito.when(configurationService.getProperty(Mockito.eq("stale-marking-enabled"), Mockito.any())).thenReturn(config.isStaleMarkingEnabled());
Mockito.when(configurationService.getProperty(Mockito.eq("reconciliation-retry-count"), Mockito.any())).thenReturn(config.getReconciliationRetryCount());
Mockito.when(configurationService.getProperty(Mockito.eq("bundle-based-reconciliation-enabled"), Mockito.any())).thenReturn(config.isBundleBasedReconciliationEnabled());
return configurationService;
}
use of org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService in project openflowplugin by opendaylight.
the class LLDPLinkAgerTest method getConfigurationService.
private ConfigurationService getConfigurationService() {
final ConfigurationService configurationService = Mockito.mock(ConfigurationService.class);
final TopologyLldpDiscoveryConfig config = getConfig();
Mockito.when(configurationService.registerListener(Mockito.any())).thenReturn(() -> {
});
Mockito.when(configurationService.getProperty(Mockito.eq("topology-lldp-interval"), Mockito.any())).thenReturn(config.getTopologyLldpInterval());
Mockito.when(configurationService.getProperty(Mockito.eq("topology-lldp-expiration-interval"), Mockito.any())).thenReturn(config.getTopologyLldpExpirationInterval());
return configurationService;
}
Aggregations