Exemplo n.º 1
0
        public void EnsureExactlyOnce_StrategyBuildAction_ExactlyOnceStrategySet()
        {
            var builder = new TestConsumerEndpointBuilder();

            var endpoint = builder.EnsureExactlyOnce(strategy => strategy.StoreOffsets()).Build();

            endpoint.ExactlyOnceStrategy.Should().BeOfType <OffsetStoreExactlyOnceStrategy>();
        }
Exemplo n.º 2
0
        public void EnsureExactlyOnce_Strategy_ExactlyOnceStrategySet()
        {
            var builder  = new TestConsumerEndpointBuilder();
            var strategy = new OffsetStoreExactlyOnceStrategy();

            var endpoint = builder.EnsureExactlyOnce(strategy).Build();

            endpoint.ExactlyOnceStrategy.Should().BeSameAs(strategy);
        }