예제 #1
0
        public void CreateTest_will_be_skipped_with_error_when_multiple_test_attributes_specified()
        {
            var tc          = new ReflectedTestClass(typeof(PHasMethodWithMultipleAttributes));
            var testContext = SelfTestUtility.NewTestContext(tc, new FakeRunner());

            tc.InitializeSafe(testContext);

            var exec   = new FakeTestExecutionContext(testContext, (TestCaseInfo)tc.Children[0], new PHasMethodWithMultipleAttributes());
            var result = exec.RunCurrentTest();

            Assert.Equal("Problem creating test (SpecException: Method has more than one fact or theory attribute)", result.Reason);
            Assert.True(result.Failed);
        }
예제 #2
0
        protected override TestExecutionContext CreateChildContext(TestUnit test)
        {
            var result = new FakeTestExecutionContext(this, (TestCaseInfo)test, TestObject);

            return(result);
        }