Exemple #1
0
        public void Should_return_same_instance_when_adding_multiple_statuscodehandlers()
        {
            //Given
            var configurator = new CarterConfigurator();

            //When
            var sameconfigurator = configurator.WithStatusCodeHandlers(typeof(TeapotStatusCodeHandler), typeof(NoOpStatusCodeHandler));

            //Then
            Assert.Same(configurator, sameconfigurator);
        }
Exemple #2
0
        public void Should_add_multiple_statuscodehandlers()
        {
            //Given
            var configurator = new CarterConfigurator();

            //When
            configurator.WithStatusCodeHandlers(typeof(TeapotStatusCodeHandler), typeof(NoOpStatusCodeHandler));

            //Then
            Assert.Equal(2, configurator.StatusCodeHandlerTypes.Count);
        }