[ExpectedException(typeof(Exception))] //delete through GET should not be allowed public void Get_Delete() { dynamic webPage = new MockGet(new string[] { "Mock", "Delete", "y", "z" }); dynamic controller = new MockController(); Mvc.Run(webPage, controller); controller.Verify(); }
public void Get_Edit_Pass_String() { dynamic webPage = new MockGet(new string[] { "Mock", "Edit", "y", "z" }); dynamic controller = new MockController(); Mvc.Run(webPage, controller); Assert.AreEqual("y/z", controller.Id); controller.Verify(); }
public void Routing_Post() { dynamic webPage = new MockPost(new string[] { "Mock", "a", "b", "c" }, null); dynamic controller = new MockController(); Mvc.Run(webPage, controller); Assert.IsTrue(controller.Post_Called); controller.Verify(); }
public void Routing_Get() { dynamic webPage = new MockGet(new string[] { "Mock", "a", "1", "2" }); dynamic controller = new MockController(); Mvc.Run(webPage, controller); Assert.IsTrue(controller.Get_Called); controller.Verify(); }
public void Post_Delete() { dynamic webPage = new MockPost(new string[] { "Mock", "Delete", "y", "z" }, null); dynamic controller = new MockController(); Mvc.Run(webPage, controller); Assert.AreEqual("y/z", controller.Id); controller.Verify(); }
public void Routing_All() { dynamic webPage = new MockGet(new string[] { "Mock", "x", "y", "z" }); dynamic controller = new MockController(); Mvc.Run(webPage, controller); Assert.IsTrue(controller.All_Called); Assert.AreEqual("y", controller.UrlData[1]); Assert.AreEqual("z", controller.UrlData[2]); controller.Verify(); }
public void Post_Edit_Pass_Form() { dynamic webPage = new MockPost(new string[] { "Mock", "Edit", "y", "z" }, null); webPage.Request.TestValue = -20.3m; dynamic controller = new MockController(); Mvc.Run(webPage, controller); Assert.AreEqual("y/z", controller.Id); Assert.AreEqual(-20.3m, controller.TestValue); controller.Verify(); }
public void Get_Delete() { dynamic webPage = new MockGet(new string[] { "Mock", "Delete", "y", "z" }); dynamic controller = new MockController(); Mvc.Run(webPage, controller); controller.Verify(); }