Пример #1
0
        public void GetValidatorWithMessageSupportNonGenericShouldReturnInstanceOfMessageAdapter(MessageSupportValidatorWrapper sut)
        {
            var validator = new Mock <IValidator <string> >();

            validator.As <IValidator>().SetupGet(x => x.ValidatedType).Returns(typeof(string));
            Assert.That(() => sut.GetValidatorWithMessageSupport(validator.As <IValidator>().Object), Is.InstanceOf <MessageEnrichingValidatorDecorator <string> >());
        }
Пример #2
0
 public void GetValidatorWithMessageSupportShouldReturnInstanceOfMessageAdapter(MessageSupportValidatorWrapper sut, IValidator <string> validator)
 {
     Assert.That(() => sut.GetValidatorWithMessageSupport(validator), Is.InstanceOf <MessageEnrichingValidatorDecorator <string> >());
 }