示例#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;
 }
 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);
 }
 public static async Task PublicStaticAsyncTaskMethodWithTC(UTFExtension.TestContext tc)
 {
     await Task.FromResult(true).ConfigureAwait(false);
 }