コード例 #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);
 }