private ParameterInfo param(string name)
        {
            var ctor = new Constructor(typeof (LotsOfStuff));
            foreach (ParameterInfo parameterInfo in ctor.Ctor.GetParameters())
            {
                if (parameterInfo.Name == name)
                {
                    return parameterInfo;
                }
            }

            throw new NotImplementedException();
        }
        public void GetGreediestConstructor()
        {
            var ctor = new Constructor(typeof (GreaterThanRule));
            ConstructorInfo constructor = ctor.Ctor;

            Assert.IsNotNull(constructor);
            Assert.AreEqual(2, constructor.GetParameters().Length, "Should have 2 inputs");
        }
        public void GetFirstMarkedConstructor()
        {
            var ctor = new Constructor(typeof (ComplexRule));
            ConstructorInfo constructor = ctor.Ctor;

            Assert.IsNotNull(constructor);
            Assert.AreEqual(7, constructor.GetParameters().Length, "Should have 7 inputs, not 8");
        }
 public void CanBeAutoFilled_with_child_array_in_ctor()
 {
     var ctor = new Constructor(typeof (CanBeAutoFilledWithArray));
     Assert.IsTrue(ctor.CanBeAutoFilled());
 }
Beispiel #5
0
 public bool CanBeCreated()
 {
     return(Constructor.HasConstructors(_pluggedType));
 }
Beispiel #6
0
 public Plugin(Type pluggedType)
 {
     _pluggedType = pluggedType;
     _setters     = new SetterPropertyCollection(this);
     _constructor = new Constructor(pluggedType);
 }