示例#1
0
 /// <summary>
 /// Construct an object of this Type, using the specified arguments.
 /// </summary>
 public object Construct(object[] args)
 {
     return(Reflect.Construct(Type, args));
 }
示例#2
0
 /// <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));
 }
示例#3
0
 /// <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);
 }
示例#4
0
 /// <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));
 }
示例#5
0
 public object?Invoke(object?fixture, params object?[]?args)
 {
     return(Reflect.InvokeMethod(MethodInfo, fixture, args));
 }