public void Execute(ThrowingMethods throwingMethods)
        {
            var scenario = new DisposableScenario(throwingMethods);

            var bddifier = scenario.LazyBDDfy();

            try
            {
                // we need TestObject for this test; so I disable StoryCache processor for this one test
                BDDfy.Configuration.Configurator.Processors.StoryCache.Disable();
                bddifier.Run();
            }
            catch (Exception)
            {
                // there will be an exception but we do not care about it
            }
            finally
            {
                BDDfy.Configuration.Configurator.Processors.StoryCache.Enable();
            }
            var story = bddifier.Story;

            Assert.That(story.Scenarios.All(s => ((DisposableScenario)s.TestObject).Disposed), Is.False);
            Assert.That(scenario.Disposed, Is.False);
        }
        public void Execute(ThrowingMethods throwingMethods)
        {
            var scenario = new DisposableScenario(throwingMethods);

            var bddifier = scenario.LazyBDDfy();
            try
            {
                bddifier.Run();
            }
            catch (Exception)
            {
                // there will be an exception but we do not care about it
            }
            var story = bddifier.Story;

            Assert.That(story.Scenarios.All(s => ((DisposableScenario)s.TestObject).Disposed), Is.False);
            Assert.That(scenario.Disposed, Is.False);
        }
Exemple #3
0
        public void Execute(ThrowingMethods throwingMethods)
        {
            var scenario = new DisposableScenario(throwingMethods);

            var bddifier = scenario.LazyBDDfy();

            try
            {
                bddifier.Run();
            }
            catch (Exception)
            {
                // there will be an exception but we do not care about it
            }
            var story = bddifier.Story;

            Assert.That(story.Scenarios.All(s => ((DisposableScenario)s.TestObject).Disposed), Is.False);
            Assert.That(scenario.Disposed, Is.False);
        }
        public void Execute(ThrowingMethods throwingMethods)
        {
            var scenario = new DisposableScenario(throwingMethods);

            var bddifier = scenario.LazyBDDfy();
            try
            {
                // we need TestObject for this test; so I disable StoryCache processor for this one test
                BDDfy.Configuration.Configurator.Processors.StoryCache.Disable();
                bddifier.Run();
            }
            catch (Exception)
            {
                // there will be an exception but we do not care about it
            }
            finally
            {
                BDDfy.Configuration.Configurator.Processors.StoryCache.Enable();
            }
            var story = bddifier.Story;

            story.Scenarios.All(s => ((DisposableScenario)s.TestObject).Disposed).ShouldBe(false);
            scenario.Disposed.ShouldBe(false);
        }