コード例 #1
0
        public void execute_with_false()
        {
            FactAssertion assertion = FactAssertion.Create(x => x.Failure(), new AssertionFixture());
            var           step      = new Step();
            var           context   = new TestContext();

            assertion.Execute(step, context);
            context.Counts.ShouldEqual(0, 1, 0, 0);

            step.Get("returnValue").Parse <bool>().ShouldBeTrue();
            context.ResultsFor(step).ActualDisplay <bool>("returnValue").ShouldBeFalse();
        }
コード例 #2
0
        public void get_the_cells()
        {
            FactAssertion assertion = FactAssertion.Create(x => x.MethodWithArgs(null, 0),
                                                           new AssertionFixture());
            IList <Cell> actual   = assertion.GetCells();
            var          expected = new List <Cell>
            {
                Cell.For <string>("name"),
                Cell.For <int>("age"),
                Cell.For <bool>("returnValue")
            };

            TestUtility.AssertListMatches((IList)actual, expected);
        }