public void SelectMethodsFromNullTypeThrows()
 {
     // Fixture setup
     var sut = new ModestConstructorQuery();
     // Exercise system and verify outcome
     Assert.Throws<ArgumentNullException>(() =>
         sut.SelectMethods(null));
     // Teardown
 }
 public void SelectMethodsFromTypeWithNoPublicConstructorReturnsCorrectResult()
 {
     // Fixture setup
     var sut = new ModestConstructorQuery();
     var typeWithNoPublicConstructors = typeof(AbstractType);
     // Exercise system
     var result = sut.SelectMethods(typeWithNoPublicConstructors);
     // Verify outcome
     Assert.False(result.Any());
     // Teardown
 }
        public void SelectMethodsFromTypeReturnsCorrectResult(Type type)
        {
            // Fixture setup
            var expectedConstructors = from ci in type.GetConstructors()
                                       let parameters = ci.GetParameters()
                                       orderby parameters.Length ascending
                                       select new ConstructorMethod(ci) as IMethod;

            var sut = new ModestConstructorQuery();
            // Exercise system
            var result = sut.SelectMethods(type);
            // Verify outcome
            Assert.True(expectedConstructors.SequenceEqual(result));
            // Teardown
        }