public void EndFormTwiceRendersCloseFormTagOnce() { // Arrange Mock <HttpResponseBase> mockHttpResponse = GetHttpResponseForForm(); MvcForm form = new MvcForm(mockHttpResponse.Object); // Act form.EndForm(); form.EndForm(); // Assert mockHttpResponse.Verify(); }
public void EndFormTwiceRendersCloseFormTagOnce() { // Arrange StringWriter writer = new StringWriter(); ViewContext viewContext = GetViewContext(writer); MvcForm form = new MvcForm(viewContext); // Act form.EndForm(); form.EndForm(); // Assert Assert.Equal("</form>", writer.ToString()); }
public ExampleConfigurator End() { writer.RenderEndTag(); // fieldset if (form != null) { form.EndForm(); } return(this); }
public void Dispose() { form.EndForm(); helper.ViewContext.Writer.Write(this.html); }