예제 #1
0
        public void Should_add_multiple_responsenegotiators()
        {
            //Given
            var configurator = new CarterConfigurator();

            //When
            configurator.WithResponseNegotiators(typeof(TestResponseNegotiator), typeof(TestXmlResponseNegotiator));

            //Then
            Assert.Equal(2, configurator.ResponseNegotiatorTypes.Count);
        }
예제 #2
0
        public void Should_return_same_instance_when_adding_multiple_responsenegotiators()
        {
            //Given
            var configurator = new CarterConfigurator();

            //When
            var sameconfigurator = configurator.WithResponseNegotiators(typeof(TestResponseNegotiator), typeof(TestXmlResponseNegotiator));

            //Then
            Assert.Same(configurator, sameconfigurator);
        }
예제 #3
0
        public void Should_exclude_negotiators()
        {
            //Given
            var configurator = new CarterConfigurator();

            //When
            var sameconfigurator = configurator.WithResponseNegotiators();

            //Then
            Assert.Equal(0, sameconfigurator.ResponseNegotiatorTypes.Count);
        }