Esempio n. 1
0
        public void Test_Mock_Session()
        {
            MockController controller = null;

            Given("we have a mock controller with a fake session", () =>
            {
                controller = new MockController();
                controller.SetFakeControllerContext();
            });

            When("we create a test session", () => controller.TestSession());

            Then("the test session should contain the right content", () =>
            {
                controller.HttpContext.Session["item2"].ShouldBe("This is used for testing a mock session.");
            });
        }