Search in sources :

Example 11 with TestChannelBinder

use of org.springframework.cloud.stream.binder.test.TestChannelBinder in project spring-cloud-stream by spring-cloud.

the class PollableConsumerTests method createBinder.

private TestChannelBinder createBinder(String... args) {
    this.context = new SpringApplicationBuilder(TestChannelBinderConfiguration.getCompleteConfiguration()).web(WebApplicationType.NONE).run(args);
    TestChannelBinder binder = context.getBean(TestChannelBinder.class);
    return binder;
}
Also used : SpringApplicationBuilder(org.springframework.boot.builder.SpringApplicationBuilder) TestChannelBinder(org.springframework.cloud.stream.binder.test.TestChannelBinder)

Aggregations

TestChannelBinder (org.springframework.cloud.stream.binder.test.TestChannelBinder)11 Test (org.junit.Test)10 MessageConverterConfigurer (org.springframework.cloud.stream.binding.MessageConverterConfigurer)8 AtomicReference (java.util.concurrent.atomic.AtomicReference)4 Message (org.springframework.messaging.Message)4 MessageChannel (org.springframework.messaging.MessageChannel)4 ChannelInterceptorAdapter (org.springframework.messaging.support.ChannelInterceptorAdapter)4 GenericMessage (org.springframework.messaging.support.GenericMessage)4 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)3 SpringApplicationBuilder (org.springframework.boot.builder.SpringApplicationBuilder)3 CountDownLatch (java.util.concurrent.CountDownLatch)2 InputDestination (org.springframework.cloud.stream.binder.test.InputDestination)2 ApplicationContext (org.springframework.context.ApplicationContext)2 SubscribableChannel (org.springframework.messaging.SubscribableChannel)2 MessageConversionException (org.springframework.messaging.converter.MessageConversionException)2 List (java.util.List)1 Map (java.util.Map)1 BindingProperties (org.springframework.cloud.stream.config.BindingProperties)1 BindingServiceProperties (org.springframework.cloud.stream.config.BindingServiceProperties)1