public TestClassInfoTests() { this.testClassType = typeof(DummyTestClass); this.testClassConstructor = this.testClassType.GetConstructors().First(); this.testContextProperty = this.testClassType.GetProperties().First(); this.testClassAttribute = (UTF.TestClassAttribute) this.testClassType.GetCustomAttributes().First(); this.testAssemblyInfo = new TestAssemblyInfo(); this.testClassInfo = new TestClassInfo( this.testClassType, this.testClassConstructor, this.testContextProperty, this.testClassAttribute, this.testAssemblyInfo); this.testContext = new Mock <UTFExtension.TestContext>().Object; }
public static void ClassInitialize(UTFExtension.TestContext tc) { ClassInitializeMethodBody.Invoke(); }
// The reflectHelper instance would set the AssemblyInitialize attribute here before running any tests. // Setting an attribute causes conflicts with other tests. public static void AssemblyInitialize(UTFExtension.TestContext tc) { AssemblyInitializeMethodBody.Invoke(); }
public static void DummyClassInit(UTFExtension.TestContext tc) { ClassInitializeMethodBody(tc); }
public static void DummyAssemblyInit(UTFExtension.TestContext tc) { AssemblyInitializeMethodBody(tc); }
private static void InitMethodThrowingException(UTFExtension.TestContext tc) { throw new ArgumentException(); }
public static void ClassInitializeMethod(UTFExtension.TestContext testContext) { ClassInitializeMethodBody?.Invoke(testContext); }
public TestAssemblyInfoTests() { this.testAssemblyInfo = new TestAssemblyInfo(typeof(TestAssemblyInfoTests).Assembly); this.dummyMethodInfo = typeof(TestAssemblyInfoTests).GetMethods().First(); this.testContext = new Mock <UTFExtension.TestContext>().Object; }
public static async void PublicStaticAsyncVoidMethodWithTC(UTFExtension.TestContext tc) { await Task.FromResult(true); }
public static Task PublicStaticNonAsyncTaskMethodWithTC(UTFExtension.TestContext tc) { return(Task.FromResult(true)); }
public static void PublicStaticMethodWithTC(UTFExtension.TestContext tc) { }
public static int PublicStaticMethodWithTCReturningInt(UTFExtension.TestContext tc) { return(0); }
public static async Task PublicStaticAsyncTaskMethodWithTC(UTFExtension.TestContext tc) { await Task.FromResult(true).ConfigureAwait(false); }