public void DelegatesResolvingToNextIfNoConstructorIsMarked()
        {
            var next = new Mock<AbstractConstructorResolver>(null);
            next
                .Setup(x => x.GetConstructor(typeof(NoAttributes)))
                .Returns(() => null);

            var resolver = new AttributeConstructorResolver(next.Object);
            Assert.AreEqual(null, resolver.GetConstructor(typeof(NoAttributes)));
        }
 public void ThrowsExceptionWhenThereAreTwoMarkedConstructors()
 {
     AttributeConstructorResolver resolver = new AttributeConstructorResolver(null);
     resolver.GetConstructor(typeof(AmbiguiousAttributes));
 }
 public void FindsCorrectConstructorIfOneIsMarked()
 {
     var resolver = new AttributeConstructorResolver(null);
     Assert.AreEqual(0, resolver.GetConstructor(typeof(UnambigiousAttributes)).GetParameters().Length);
 }