public void Test()
        {
            var testObject = new TestClassWithStepsReturningTheirText(1, "some input");
            var steps = new DefaultMethodNameStepScanner().Scan(TestContext.GetContext(testObject)).ToList();

            AssertStep(steps[0], "Given inputs 1 and some input", ExecutionOrder.SetupState);
            AssertStep(steps[1], "When input 2 is applied on 123", ExecutionOrder.Transition);
            AssertStep(steps[2], "Then some assertions", ExecutionOrder.Assertion, true);
        }
        public void Test()
        {
            var testObject = new TestClassWithStepsReturningTheirText(1, "some input");
            var steps      = new DefaultMethodNameStepScanner().Scan(TestContext.GetContext(testObject)).ToList();

            AssertStep(steps[0], "Given inputs 1 and some input", ExecutionOrder.SetupState);
            AssertStep(steps[1], "When input 2 is applied on 123", ExecutionOrder.Transition);
            AssertStep(steps[2], "Then some assertions", ExecutionOrder.Assertion, true);
        }
        static void VerifyMethod(string expectedStepTitle, bool exists = true)
        {
            var testObject = new ScenarioWithVaryingStepTexts();
            var scanner    = new DefaultMethodNameStepScanner();
            var steps      = scanner.Scan(TestContext.GetContext(testObject)).ToList();
            var theStep    = steps.Where(s => s.Title == expectedStepTitle);

            theStep.Count().ShouldBe(exists ? 1 : 0);
        }
        static void VerifyMethod(string expectedStepTitle, bool exists = true)
        {
            var testObject = new ScenarioWithVaryingStepTexts();
            var scanner = new DefaultMethodNameStepScanner();
            var steps = scanner.Scan(TestContext.GetContext(testObject)).ToList();
            var theStep = steps.Where(s => s.Title == expectedStepTitle);

            theStep.Count().ShouldBe(exists ? 1 : 0);
        }
 static void VerifyMethod(string expectedStepTitle, bool exists = true)
 {
     var testObject = new ScenarioWithVaryingStepTexts();
     var scanner = new DefaultMethodNameStepScanner();
     var steps = scanner.Scan(TestContext.GetContext(testObject)).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));
 }
Пример #6
0
        static void VerifyMethod(string expectedStepTitle, bool exists = true)
        {
            var testObject = new ScenarioWithVaryingStepTexts();
            var scanner    = new DefaultMethodNameStepScanner();
            var steps      = scanner.Scan(TestContext.GetContext(testObject)).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));
            }
        }