Пример #1
0
        public void TestGuestInformation()
        {
            var sut = new GuestController();

            GuestController.Current = new Reservation();
            GuestController.Current.HotelsLocation = new Location {
                ClientID = 1
            };
            GuestController.CurrentGuest = new Guest();
            Guest g = new Guest {
                FirstName = "o", LastName = "p", PartySize = 2
            };
            var view   = sut.GuestInformation(g);
            var actual = GuestController.CurrentGuest.ClientID;
            //When
            var expected = 1;

            //Then
            Assert.NotNull(view);
            Assert.IsType <RedirectToActionResult>(view);
            Assert.True(expected == actual);
        }