Esempio n. 1
0
        private TestRunState Run(Assembly assembly, MemberInfo member, ITestListener tddNetListener)
        {
            var locator = new StoryLocator
                              {
                                  RootLocation = Path.GetDirectoryName(assembly.Location)
                              };

            var type = member as Type;
            var stories = (type == null)
                              ? locator.LocateAllStories()
                              : locator.LocateStoriesMatching(type);

            var results = NBehaveConfiguration
                .New
                .DontIsolateInAppDomain()
                .SetEventListener(new StoryRunnerEventListenerProxy(tddNetListener))
                .SetScenarioFiles(stories)
                .SetAssemblies(new[] {assembly.Location})
                .SetFilter(StoryRunnerFilter.GetFilter(member))
                .Build()
                .Run();

            return GetTestRunState(results);
        }
Esempio n. 2
0
        private TestRunState Run(Assembly assembly, MemberInfo member, ITestListener tddNetListener)
        {
            var locator = new StoryLocator
            {
                RootLocation = Path.GetDirectoryName(assembly.Location)
            };

            var type    = member as Type;
            var stories = (type == null)
                              ? locator.LocateAllStories()
                              : locator.LocateStoriesMatching(type);

            var results = NBehaveConfiguration
                          .New
                          .DontIsolateInAppDomain()
                          .SetEventListener(new StoryRunnerEventListenerProxy(tddNetListener))
                          .SetScenarioFiles(stories)
                          .SetAssemblies(new[] { assembly.Location })
                          .SetFilter(StoryRunnerFilter.GetFilter(member))
                          .Build()
                          .Run();

            return(GetTestRunState(results));
        }