use of com.netflix.conductor.core.config.ValidationModule in project conductor by Netflix.
the class MetadataServiceTest method before.
@Before
public void before() {
metadataDAO = Mockito.mock(MetadataDAO.class);
eventHandlerDAO = Mockito.mock(EventHandlerDAO.class);
eventQueues = Mockito.mock(EventQueues.class);
configuration = Mockito.mock(Configuration.class);
when(configuration.isOwnerEmailMandatory()).thenReturn(true);
Injector injector = Guice.createInjector(new AbstractModule() {
@Override
protected void configure() {
bind(MetadataDAO.class).toInstance(metadataDAO);
bind(EventHandlerDAO.class).toInstance(eventHandlerDAO);
bind(EventQueues.class).toInstance(eventQueues);
bind(Configuration.class).toInstance(configuration);
install(new ValidationModule());
bindInterceptor(Matchers.any(), Matchers.annotatedWith(Service.class), new ServiceInterceptor(getProvider(Validator.class)));
}
});
metadataService = injector.getInstance(MetadataServiceImpl.class);
}
use of com.netflix.conductor.core.config.ValidationModule in project conductor by Netflix.
the class WorkflowBulkServiceTest method before.
@Before
public void before() {
workflowExecutor = Mockito.mock(WorkflowExecutor.class);
Injector injector = Guice.createInjector(new AbstractModule() {
@Override
protected void configure() {
bind(WorkflowExecutor.class).toInstance(workflowExecutor);
install(new ValidationModule());
bindInterceptor(Matchers.any(), Matchers.annotatedWith(Service.class), new ServiceInterceptor(getProvider(Validator.class)));
}
});
workflowBulkService = injector.getInstance(WorkflowBulkServiceImpl.class);
}
use of com.netflix.conductor.core.config.ValidationModule in project conductor by Netflix.
the class ServerModule method configure.
@Override
protected void configure() {
install(new CoreModule());
install(new ValidationModule());
install(new ArchaiusModule());
install(new JettyModule());
install(new GRPCModule());
install(new EventModule());
bindInterceptor(Matchers.any(), Matchers.annotatedWith(Service.class), new ServiceInterceptor(getProvider(Validator.class)));
bind(Configuration.class).to(SystemPropertiesConfiguration.class).in(Scopes.SINGLETON);
bind(ExecutorService.class).toProvider(ExecutorServiceProvider.class).in(Scopes.SINGLETON);
bind(WorkflowSweeper.class).asEagerSingleton();
bind(WorkflowMonitor.class).asEagerSingleton();
}
Aggregations