Пример #1
0
        public void Should_return_same_instance_when_adding_validator()
        {
            //Given
            var configurator = new CarterConfigurator();

            //When
            var sameconfigurator = configurator.WithValidator <TestModelValidator>();

            //Then
            Assert.Same(configurator, sameconfigurator);
        }
Пример #2
0
        public void Should_add_single_validator()
        {
            //Given
            var configurator = new CarterConfigurator();

            //When
            configurator.WithValidator <TestModelValidator>();

            //Then
            Assert.Single(configurator.ValidatorTypes);
        }