예제 #1
0
        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;
        }
예제 #2
0
 public static void ClassInitialize(UTFExtension.TestContext tc)
 {
     ClassInitializeMethodBody.Invoke();
 }
예제 #3
0
 // 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();
 }
예제 #4
0
 public static void DummyClassInit(UTFExtension.TestContext tc)
 {
     ClassInitializeMethodBody(tc);
 }
예제 #5
0
 public static void DummyAssemblyInit(UTFExtension.TestContext tc)
 {
     AssemblyInitializeMethodBody(tc);
 }
예제 #6
0
 private static void InitMethodThrowingException(UTFExtension.TestContext tc)
 {
     throw new ArgumentException();
 }
예제 #7
0
 public static void ClassInitializeMethod(UTFExtension.TestContext testContext)
 {
     ClassInitializeMethodBody?.Invoke(testContext);
 }
예제 #8
0
 public TestAssemblyInfoTests()
 {
     this.testAssemblyInfo = new TestAssemblyInfo(typeof(TestAssemblyInfoTests).Assembly);
     this.dummyMethodInfo  = typeof(TestAssemblyInfoTests).GetMethods().First();
     this.testContext      = new Mock <UTFExtension.TestContext>().Object;
 }
예제 #9
0
 public static async void PublicStaticAsyncVoidMethodWithTC(UTFExtension.TestContext tc)
 {
     await Task.FromResult(true);
 }
예제 #10
0
 public static Task PublicStaticNonAsyncTaskMethodWithTC(UTFExtension.TestContext tc)
 {
     return(Task.FromResult(true));
 }
예제 #11
0
 public static void PublicStaticMethodWithTC(UTFExtension.TestContext tc)
 {
 }
예제 #12
0
 public static int PublicStaticMethodWithTCReturningInt(UTFExtension.TestContext tc)
 {
     return(0);
 }
예제 #13
0
 public static async Task PublicStaticAsyncTaskMethodWithTC(UTFExtension.TestContext tc)
 {
     await Task.FromResult(true).ConfigureAwait(false);
 }