Esempio n. 1
0
        public void Should_execute_scenariotext_scenario()
        {
            var storyAssemblies = new[] { typeof(GreetingSystemActionSteps).Assembly.Location };
            var outputPath      = Path.Combine(Path.GetDirectoryName(storyAssemblies[0]), "greetingresult.xml");
            var buildEngine     = MockRepository.GenerateStub <IBuildEngine2>();

            var task = new NBehaveTask(buildEngine)
            {
                DryRun         = false,
                FailBuild      = true,
                XmlOutputFile  = outputPath,
                TestAssemblies = storyAssemblies,
                ScenarioFiles  = new[] { "GreetingSystem.scenario" }
            };

            task.Execute();
            Assert.AreEqual(1, task.FeatureResults.NumberOfPassingScenarios);
        }
Esempio n. 2
0
        public void Should_execute_scenariotext_scenario()
        {
            var storyAssemblies = new[] { typeof(GreetingSystemActionSteps).Assembly.Location };
            var outputPath = Path.Combine(Path.GetDirectoryName(storyAssemblies[0]), "greetingresult.xml");
            var buildEngine = MockRepository.GenerateStub<IBuildEngine2>();

            var task = new NBehaveTask(buildEngine)
            {
                DryRun = false,
                FailBuild = true,
                XmlOutputFile = outputPath,
                TestAssemblies = storyAssemblies,
                ScenarioFiles = new[] { "GreetingSystem.scenario" }
            };

            task.Execute();
            Assert.AreEqual(1, task.FeatureResults.NumberOfPassingScenarios);
        }