/// <summary> /// Construct an object of this Type, using the specified arguments. /// </summary> public object Construct(object[] args) { return(Reflect.Construct(Type, args)); }
/// <summary> /// Returns a flag indicating whether this type has a method with an attribute of the specified type. /// </summary> /// <param name="attributeType"></param> /// <returns></returns> public bool HasMethodWithAttribute(Type attributeType) { return(Reflect.HasMethodWithAttribute(Type, attributeType)); }
/// <summary> /// Initializes a new instance of the <see cref="TestFixture"/> class. /// </summary> /// <param name="fixtureType">Type of the fixture.</param> /// <param name="arguments">The arguments.</param> public TestFixture(Type fixtureType, object[] arguments) : base(fixtureType, arguments) { this.setUpMethods = Reflect.GetMethodsWithAttribute(FixtureType, typeof(SetUpAttribute), true); this.tearDownMethods = Reflect.GetMethodsWithAttribute(FixtureType, typeof(TearDownAttribute), true); }
/// <summary> /// Invokes the method, converting any TargetInvocationException to an NUnitException. /// </summary> /// <param name="fixture">The object on which to invoke the method</param> /// <param name="args">The argument list for the method</param> /// <returns>The return value from the invoked method</returns> public object Invoke(object fixture, params object[] args) { return(Reflect.InvokeMethod(MethodInfo, fixture, args)); }
public object?Invoke(object?fixture, params object?[]?args) { return(Reflect.InvokeMethod(MethodInfo, fixture, args)); }