예제 #1
0
        public void GetValidatedType_CollectorWitApplyWithMixinAttribute()
        {
            var result = _resolver.GetValidatedType(typeof(CustomerMixinIntroducedValidationCollector1));

            _decoratedResolverMock.VerifyAllExpectations();
            Assert.That(result, Is.EqualTo(typeof(CustomerMixin)));
        }
예제 #2
0
        public void GetValidatedType_CollectorWithoutGenericArgument()
        {
            _decoratedResolverMock.Expect(mock => mock.GetValidatedType(typeof(IComponentValidationCollector))).Return(typeof(string));

            var result = _resolver.GetValidatedType(typeof(IComponentValidationCollector));

            _decoratedResolverMock.VerifyAllExpectations();
            Assert.That(result, Is.EqualTo(typeof(string)));
        }