public void RoomTypesCreateValid() { RoomTypesController controller = new RoomTypesController(); var result = controller.Create() as ViewResult; Assert.IsNotNull("...", result.ViewName); var newResult = controller.Create(); Assert.IsInstanceOfType(newResult, typeof(ViewResult)); }
public void RoomTypesCreate() { RoomTypesController controller = new RoomTypesController(); RoomType rt = new RoomType(); rt.RoomTypeId = 0; rt.RoomTypeName="Deluxe"; var result = controller.Create(rt); Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult)); }