Example #1
0
        public void TestViewLocations()
        {
            var sut = new GuestController();

            GuestController.Current = new Reservation();
            GuestController.Current.HotelsLocation = new Location {
                Street = "1000 Mesquite St"
            };
            var view   = sut.ViewLocations(GuestController.Current.HotelsLocation);
            var actual = GuestController.Current.HotelsLocation.State;
            //When
            var expected = "Texas";

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