Exemplo n.º 1
0
 public void Should_not_throw_if_feature_passes()
 {
     var listener = new FailSpecResultEventListener();
     var runner   = ConfigurationNoAppDomain
                    .New
                    .SetScenarioFiles(new[] { TestFeatures.FeatureNamedStory })
                    .SetAssemblies(new[] { "TestPlainTextAssembly.dll" })
                    .SetEventListener(listener)
                    .Build(); Assert.DoesNotThrow(() => runner.Run());
 }
Exemplo n.º 2
0
        public void Should_throw_TestFailedException()
        {
            var listener = new FailSpecResultEventListener();
            var runner   = ConfigurationNoAppDomain
                           .New
                           .SetScenarioFiles(new[] { TestFeatures.FeatureWithFailingStep })
                           .SetAssemblies(new[] { "TestPlainTextAssembly.dll" })
                           .SetEventListener(listener)
                           .Build();

            Assert.Throws <StepFailedException>(() => runner.Run());
        }