private IEnumerable<IExecutionStep> toExecutionSteps(FixtureLibrary library, Fixture fixture) { var setup = SilentAction.AsCritical("Fixture", Stage.setup, x => { fixture.Context = x; fixture.SetUp(); }, this); setup.Subject = Key + ":SetUp"; yield return setup; // Ignore comments! foreach (var step in Children.OfType<Step>()) { var grammar = fixture.GrammarFor(step.Key); yield return grammar.CreatePlan(step, library); } var teardown = SilentAction.AsCritical("Fixture", Stage.teardown, x => fixture.TearDown(), this); teardown.Subject = Key + ":TearDown"; yield return teardown; }
public void fixture_returns_a_missing_grammar_for_something_that_is_unknown() { var fixture = new Fixture(); fixture.GrammarFor("DoesNotExist").ShouldBeOfType<MissingGrammar>(); }
public void fixture_returns_a_missing_grammar_for_something_that_is_unknown() { var fixture = new Fixture(); fixture.GrammarFor("DoesNotExist").ShouldBeOfType <MissingGrammar>(); }