상속: ITestExecutionContext
예제 #1
0
        public void EstablishContext()
        {
            TestContext = new Mock<ITestContext>();
            Result = new Mock<ITestResult>();

            var fixture = new ConeFixture(typeof(Fixture), Enumerable.Empty<string>(), _ => new Fixture { Interceptor = TestContext.Object });
            ExecutionContext = TestExecutionContext.For(fixture);
        }
예제 #2
0
 public static TestExecutionContext For(IConeFixture fixture)
 {
     var context = new TestExecutionContext(fixture);
     fixture.FixtureType.GetFields()
         .ForEachWhere(
             x => x.FieldType.Implements<ITestContext>(),
             context.testContexts.Add);
     return context;
 }