示例#1
0
        public static void SetContext(object testObject, ITestContext context)
        {
            var fluentBuilder = testObject as IFluentStepBuilder;
            if (fluentBuilder != null) testObject = fluentBuilder.TestObject;

            if (ContextLookup.ContainsKey(testObject))
            {
                var oldContext = ContextLookup[testObject];
                context.Examples = oldContext.Examples;
                ContextLookup[testObject] = new TestContext(testObject);
            }
            else
            {
                ContextLookup.Add(testObject, context);
            }
        }