Пример #1
0
        public void Index_RendersView()
        {
            var controller = new GuestbookController(
                new FakeGuestbookRepository());
            var result = controller.Index() as ViewResult;

            Assert.IsNotNull(result);
        }
Пример #2
0
        public void Index_gets_most_recent_entries()
        {
            var controller = new GuestbookController(
                new FakeGuestbookRepository());
            var result           = (ViewResult)controller.Index();
            var guestbookEntries = (IList <GuestbookEntry>)result.Model;

            Assert.AreEqual(1, guestbookEntries.Count);
        }