Exemplo n.º 1
0
        public void UseInterceptor_WithNull_ShouldThrowException()
        {
            var sut = new ModelValidatorFluentBuilder();

            Should.Throw<ArgumentNullException>(() => { var chain = sut.UseInterceptor(null); });
        }
Exemplo n.º 2
0
        public void UseInterceptor_With_ShouldNotBeNull()
        {
            var sut = new ModelValidatorFluentBuilder();

            var interceptor = new Mock<IModelValidatorInterceptor>();

            var chain = sut.UseInterceptor(interceptor.Object);

            chain.ShouldNotBeNull();

            sut.ModelValidatorInterceptor.ShouldNotBeNull();

            chain.ShouldBeAssignableTo<IModelValidatorEndFluentBuilder>();
        }