public void AccServiceTypesDetails()
 {
     AccomodationServiceTypesController controller = new AccomodationServiceTypesController();
     var result = controller.Details(1);
     Assert.IsNotNull(result, "Not Expected View");
     Assert.IsInstanceOfType(result, typeof(object));
 }
        public void AccServiceTypesDeleteNotValid()
        {
            AccomodationServiceTypesController controller = new AccomodationServiceTypesController();
            var result = (HttpStatusCodeResult)controller.Delete(-1);
            Assert.AreEqual(404, result.StatusCode);
            Assert.IsInstanceOfType(result, typeof(HttpStatusCodeResult));

        }
        public void AccServiceTypesDetailsNull()
        {
            AccomodationServiceTypesController controller = new AccomodationServiceTypesController();
            var result = (HttpStatusCodeResult)controller.Details(null);
            Assert.IsInstanceOfType(result, typeof(HttpStatusCodeResult));
            Assert.AreEqual(400, result.StatusCode);

        }
 public void AccServiceTypesCreate()
 {
     AccomodationServiceTypesController controller = new AccomodationServiceTypesController();
     AccomodationServiceType st = new AccomodationServiceType();
     st.AccomodationServiceTypeId=1;
     st.Name="BabySitter";
     var result= controller.Create(st);
     Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
 }
        public void AccServiceTypesDelete()
        {
            AccomodationServiceTypesController controller = new AccomodationServiceTypesController();
            var result = controller.Delete(1);
            Assert.IsNotNull(result);

        }
 public void AccServiceTypesCreateValid()
 {
     AccomodationServiceTypesController controller = new AccomodationServiceTypesController();
     var result = controller.Create();
     Assert.IsInstanceOfType(result, typeof(ViewResult));
 }
 public void AccServiceTypesEdit()
 {
     AccomodationServiceTypesController controller = new AccomodationServiceTypesController();
     AccomodationServiceType st = new AccomodationServiceType();
     st.AccomodationServiceTypeId = 1;
     st.Name = "PlayGround";
     var result = controller.Edit(st);
     Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
     Assert.IsTrue(controller.ModelState.IsValid);
 }