public void RoomTypesDetailsNotFound()
 {
     RoomTypesController controller = new RoomTypesController();
     var result = (HttpStatusCodeResult)controller.Details(-1);
     Assert.AreEqual(404, result.StatusCode);
     Assert.IsInstanceOfType(result, typeof(HttpStatusCodeResult));
 }
        public void RoomTypeDelete()
        {
            RoomTypesController controller = new RoomTypesController();
            var result = controller.Delete(1);
            Assert.IsNotNull(result);

        }
        public void RoomTypesIndex()
        {
            RoomTypesController controller = new RoomTypesController();
            var result = controller.Index();
            Assert.IsInstanceOfType(result, typeof(ViewResult));

        }
 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 RoomTypesDeleteNull()
        {
            RoomTypesController controller = new RoomTypesController();

            var result = (HttpStatusCodeResult)controller.Delete(null);
            Assert.IsInstanceOfType(result, typeof(HttpStatusCodeResult));
            Assert.AreEqual(400, result.StatusCode);

        }
 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));
 }
        public void RoomTypesDetails()
        {
            RoomTypesController controller = new RoomTypesController();

            var result = controller.Details(1);
            Assert.IsNotNull(result, "Not Expected View");
            Assert.IsInstanceOfType(result, typeof(object));

        }
        public void RoomTypeEdit()
        {

             RoomTypesController controller = new RoomTypesController();
             RoomType rt = new RoomType();

             rt.RoomTypeId = 1;
             rt.RoomTypeName = "Premier Room with One King Bed ";
             var result = controller.Edit(rt);
             Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
             Assert.IsTrue(controller.ModelState.IsValid);
       

        }