use of org.springframework.cloud.gcp.stream.binder.pubsub.PubSubMessageChannelBinder in project spring-cloud-gcp by spring-cloud.
the class PubSubExtendedBindingsPropertiesTests method testExtendedPropertiesOverrideDefaults.
@Test
public void testExtendedPropertiesOverrideDefaults() {
BinderFactory binderFactory = this.context.getBeanFactory().getBean(BinderFactory.class);
PubSubMessageChannelBinder binder = (PubSubMessageChannelBinder) binderFactory.getBinder("pubsub", MessageChannel.class);
assertThat(binder.getExtendedConsumerProperties("custom-in").isAutoCreateResources()).isFalse();
assertThat(binder.getExtendedConsumerProperties("input").isAutoCreateResources()).isTrue();
assertThat(binder.getExtendedConsumerProperties("custom-in").getAckMode()).isEqualTo(AckMode.AUTO);
assertThat(binder.getExtendedConsumerProperties("input").getAckMode()).isEqualTo(AckMode.AUTO_ACK);
}
Aggregations