public void TestRoomList() { var sut = new GuestController(); var view = sut.ChooseRegion(); //When //Then Assert.NotNull(view); Assert.IsType <ViewResult>(view); }
public void TestChooseRegion() { var sut = new GuestController(); GuestController.Current = new Reservation(); GuestController.Current.HotelsLocation = new Location(); Location l = new Location { State = "Texas" }; var view = sut.ChooseRegion(l); var actual = GuestController.Current.HotelsLocation.State; //When var expected = "Texas"; //Then Assert.NotNull(view); Assert.IsType <RedirectToActionResult>(view); Assert.True(expected.CompareTo(actual) == 0); }