com.capitalone.dashboard.testutil.BaseCollectorTestConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Core package shared by API layer and Microservices
package com.capitalone.dashboard.testutil;
import com.capitalone.dashboard.client.RestOperationsSupplier;
import org.mockito.Mockito;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.TaskScheduler;
import java.util.HashMap;
import java.util.Map;
@ComponentScan(basePackages ={ "com.capitalone.dashboard.collector", "com.capitalone.dashboard.model"}, includeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value=TaskScheduler.class),
@ComponentScan.Filter(type = FilterType.REGEX, pattern="com.capitalone.dashboard.collector.*CollectorTask.class"), @ComponentScan.Filter(type = FilterType.REGEX, pattern = "com.capitalone.dashboard.collector.*Settings.class")})
public class BaseCollectorTestConfig {
@Bean
public RestOperationsSupplier restOperationsSupplier() {
Map> responseMap = new HashMap<>();
return new TestRestOperations(responseMap);
}
@Bean
public TaskScheduler taskScheduler() {
return Mockito.mock(TaskScheduler.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy