/// <summary> /// Creates a new fake object, faking a concrete class using the argument values /// in the specified expression as arguments for the base constructor. /// </summary> /// <param name="constructorCall">The constructor to call on the base class.</param> public FakeObject(Type type, object[] argumentsForConstructor) { Guard.IsNotNull(type, "type"); Guard.IsNotNull(argumentsForConstructor, "argumentsForConstructor"); this.Initialize(type, () => FakeGenerator.GenerateFake(type, this, argumentsForConstructor)); }
/// <summary> /// Creates a new fake object. /// </summary> public FakeObject(Type type) { Guard.IsNotNull(type, "type"); AssertThatTypeIsFakeable(type); this.Initialize(type, () => FakeGenerator.GenerateFake(type, this)); }