Exemplo n.º 1
0
            public void PhotosDelete()
            {
                PhotosController controller = new PhotosController();
                var result = controller.Delete(1);
                Assert.IsNotNull(result);

            }
Exemplo n.º 2
0
            public void PhotosCreateValid()
            {
                PhotosController controller = new PhotosController();
                var result = controller.Create();
                Assert.IsInstanceOfType(result, typeof(ViewResult));

            }
Exemplo n.º 3
0
            public void PhotosDeleteNull()
            {
                PhotosController controller = new PhotosController();
                var result = (HttpStatusCodeResult)controller.Delete(null);
                Assert.AreEqual(400, result.StatusCode);
                Assert.IsInstanceOfType(result, typeof(HttpStatusCodeResult));

            }
Exemplo n.º 4
0
            public void PhotosDetails()
            {
                PhotosController controller = new PhotosController();
                var result = controller.Details(1);
                Assert.IsNotNull(result);
                Assert.IsInstanceOfType(result, typeof(ViewResult));

            }
Exemplo n.º 5
0
            public void PhotosDetailsNotFound()
            {
                PhotosController controller = new PhotosController();
                var result = (HttpStatusCodeResult)controller.Details(-1);
                Assert.AreEqual(404, result.StatusCode);
                Assert.IsInstanceOfType(result, typeof(HttpStatusCodeResult));

            }
Exemplo n.º 6
0
            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));
                

            }