static void VerifyMethod(string expectedStepTitle, bool exists = true) { var scanner = new ExecutableAttributeStepScanner(); var steps = scanner.Scan(TestContext.GetContext(new ScenarioWithVaryingStepTexts())).ToList(); var theStep = steps.Where(s => s.Title == expectedStepTitle); theStep.Count().ShouldBe(exists ? 1 : 0); }
static void VerifyMethod(string expectedStepTitle, bool exists = true) { var scanner = new ExecutableAttributeStepScanner(); var steps = scanner.Scan(TestContext.GetContext(new ScenarioWithVaryingStepTexts())).ToList(); var theStep = steps.Where(s => s.Title == expectedStepTitle); theStep.Count().ShouldBe(exists ? 1 : 0); }
static void VerifyMethod(string expectedStepTitle, bool exists = true) { var scanner = new ExecutableAttributeStepScanner(); var steps = scanner.Scan(TestContext.GetContext(new ScenarioWithVaryingStepTexts())).ToList(); var theStep = steps.Where(s => s.Title == expectedStepTitle); if (exists) Assert.That(theStep.Count(), Is.EqualTo(1)); else Assert.That(theStep.Count(), Is.EqualTo(0)); }
static void VerifyMethod(string expectedStepTitle, bool exists = true) { var scanner = new ExecutableAttributeStepScanner(); var steps = scanner.Scan(new ScenarioWithVaryingStepTexts()).ToList(); var theStep = steps.Where(s => s.StepTitle == expectedStepTitle); if (exists) { Assert.That(theStep.Count(), Is.EqualTo(1)); } else { Assert.That(theStep.Count(), Is.EqualTo(0)); } }