public void PhotosDelete() { PhotosController controller = new PhotosController(); var result = controller.Delete(1); Assert.IsNotNull(result); }
public void PhotosCreateValid() { PhotosController controller = new PhotosController(); var result = controller.Create(); Assert.IsInstanceOfType(result, typeof(ViewResult)); }
public void PhotosDeleteNull() { PhotosController controller = new PhotosController(); var result = (HttpStatusCodeResult)controller.Delete(null); Assert.AreEqual(400, result.StatusCode); Assert.IsInstanceOfType(result, typeof(HttpStatusCodeResult)); }
public void PhotosDetails() { PhotosController controller = new PhotosController(); var result = controller.Details(1); Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(ViewResult)); }
public void PhotosDetailsNotFound() { PhotosController controller = new PhotosController(); var result = (HttpStatusCodeResult)controller.Details(-1); Assert.AreEqual(404, result.StatusCode); Assert.IsInstanceOfType(result, typeof(HttpStatusCodeResult)); }
public void PhotosEdit() { PhotosController controller = new PhotosController(); Photo photoInfo = new Photo(); photoInfo.PhotoUrl = "http://res.cloudinary.com/bitbooking/image/upload/bo_2px_solid_rgb:202020,r_5/v1441716099/2_barfns.jpg"; photoInfo.AccomodationId = 1; photoInfo.PhotoId = 1; photoInfo.Priority = 1; photoInfo.RoomTypeId = 1; var result = controller.Edit(photoInfo); Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult)); }