Search in sources :

Example 1 with SyncTaskExecutor

use of cn.taketoday.core.task.SyncTaskExecutor in project today-infrastructure by TAKETODAY.

the class ReactiveTypeHandlerTests method setup.

@BeforeEach
public void setup() throws Exception {
    ContentNegotiationManagerFactoryBean factoryBean = new ContentNegotiationManagerFactoryBean();
    factoryBean.afterPropertiesSet();
    ContentNegotiationManager manager = factoryBean.getObject();
    ReactiveAdapterRegistry adapterRegistry = ReactiveAdapterRegistry.getSharedInstance();
    this.handler = new ReactiveTypeHandler(adapterRegistry, new SyncTaskExecutor(), manager);
    resetRequest();
}
Also used : ContentNegotiationManagerFactoryBean(cn.taketoday.web.accept.ContentNegotiationManagerFactoryBean) SyncTaskExecutor(cn.taketoday.core.task.SyncTaskExecutor) ContentNegotiationManager(cn.taketoday.web.accept.ContentNegotiationManager) ReactiveAdapterRegistry(cn.taketoday.core.ReactiveAdapterRegistry) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with SyncTaskExecutor

use of cn.taketoday.core.task.SyncTaskExecutor in project today-framework by TAKETODAY.

the class ReactiveTypeHandlerTests method setup.

@BeforeEach
public void setup() throws Exception {
    ContentNegotiationManagerFactoryBean factoryBean = new ContentNegotiationManagerFactoryBean();
    factoryBean.afterPropertiesSet();
    ContentNegotiationManager manager = factoryBean.getObject();
    ReactiveAdapterRegistry adapterRegistry = ReactiveAdapterRegistry.getSharedInstance();
    this.handler = new ReactiveTypeHandler(adapterRegistry, new SyncTaskExecutor(), manager);
    resetRequest();
}
Also used : ContentNegotiationManagerFactoryBean(cn.taketoday.web.accept.ContentNegotiationManagerFactoryBean) SyncTaskExecutor(cn.taketoday.core.task.SyncTaskExecutor) ContentNegotiationManager(cn.taketoday.web.accept.ContentNegotiationManager) ReactiveAdapterRegistry(cn.taketoday.core.ReactiveAdapterRegistry) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ReactiveAdapterRegistry (cn.taketoday.core.ReactiveAdapterRegistry)2 SyncTaskExecutor (cn.taketoday.core.task.SyncTaskExecutor)2 ContentNegotiationManager (cn.taketoday.web.accept.ContentNegotiationManager)2 ContentNegotiationManagerFactoryBean (cn.taketoday.web.accept.ContentNegotiationManagerFactoryBean)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2