internal FluentScanner(TScenario testObject)
        {
            _testObject              = testObject;
            _testContext             = TestContext.GetContext(_testObject);
            _fakeExecuteActionMethod = typeof(FluentScanner <TScenario>).GetMethod("ExecuteAction", BindingFlags.Instance | BindingFlags.NonPublic);

            SetTitleFunction();
        }
示例#2
0
        public FluentStepBuilder(TScenario testObject)
        {
            TestObject = testObject;
            var existingContext = TestContext.GetContext(TestObject);

            if (existingContext.FluentScanner == null)
            {
                existingContext.FluentScanner = new FluentScanner <TScenario>(testObject);
            }

            scanner = (FluentScanner <TScenario>)existingContext.FluentScanner;
        }
示例#3
0
        static Engine InternalLazyBDDfy(
            object testObject,
            string scenarioTitle,
            Type explicitStoryType = null)
        {
            var testContext = TestContext.GetContext(testObject);

            var storyScanner = testContext.FluentScanner != null?
                               testContext.FluentScanner.GetScanner(scenarioTitle, explicitStoryType) :
                                   GetReflectiveScanner(testContext, scenarioTitle, explicitStoryType);

            return(new Engine(storyScanner));
        }
示例#4
0
 internal FluentScanner(TScenario testObject)
 {
     _testObject  = testObject;
     _testContext = TestContext.GetContext(_testObject);
 }