public void FormAction() { // Arrange var selector = new FormActionAttribute(); var context = Fakes.ControllerContext; context.HttpContext.Request.Form.Add("Action::Test", ""); // Act & Assert Assert.That(selector.IsValidName(context, null, new DynamicMethod("Test1", typeof(ActionResult), new Type[0])), Is.False); Assert.That(selector.IsValidName(context, null, new DynamicMethod("Test", typeof(ActionResult), new Type[0])), Is.True); }
public void FormAction() { // Arrange var selector = new FormActionAttribute(); var context = Fakes.ControllerContext; context.HttpContext.Request.Form.Add("Action::Test", ""); // Act & Assert Assert.That(selector.IsValidName(context, null, new DynamicMethod("Test1", typeof(ActionResult), new Type[0])), Is.False); Assert.That(selector.IsValidName(context, null, new DynamicMethod("Test", typeof(ActionResult), new Type[0])), Is.True); }