public Object( IPropertyComponent property, IMethodComponent method, IFieldComponent field, IConstructorComponent constructor, ITransposeComponent transformation, IAttributeComponent attribute, IDynamicComponent dynamicComponent, IEqualityComponent equality) { if (property == null) { throw new ArgumentNullException("property"); } if (method == null) { throw new ArgumentNullException("method"); } if (field == null) { throw new ArgumentNullException("field"); } if (constructor == null) { throw new ArgumentNullException("constructor"); } if (transformation == null) { throw new ArgumentNullException("transformation"); } if (attribute == null) { throw new ArgumentNullException("attribute"); } if (dynamicComponent == null) { throw new ArgumentNullException("dynamicComponent"); } if (equality == null) { throw new ArgumentNullException("equality"); } _property = property; _field = field; _method = method; _transformation = transformation; _constructor = constructor; _attribute = attribute; _dynamic = dynamicComponent; _equality = equality; }
private void CtorSimplestTestTypeBase(IConstructorComponent testing, Type t, BindingFlags flags) { var expecting = t.GetConstructors(flags).OrderBy(a => a.GetParameters().Count()).FirstOrDefault(); var actual = _.Object.Constructor.Simplest(t, flags); Assert.AreEqual(expecting, actual, string.Format("Failed on {0} , {1}", t.Name, flags.ToString())); }
private void CtorSimplestTestInstanceBase(IConstructorComponent testing, object instance, BindingFlags flags) { var expecting = instance.GetType().GetConstructors(flags).OrderBy(a => a.GetParameters().Count()).FirstOrDefault(); var actual = _.Object.Constructor.Simplest(instance, flags); Assert.AreEqual(expecting, actual); }