public void ModelIsPropertyInvalid_ReturnsFalse() { var model = new TestModel { Name = null, }; var html = GetHtmlHelper(model); var result = SrkHtmlExtensions.HasOtherValidationErrors(html); Assert.IsFalse(result); }
public void ModelIsOtherInvalid_ReturnsFalse() { var model = new TestModel { Name = "hello", }; var html = GetHtmlHelper(model); html.ViewData.ModelState.AddModelError(string.Empty, "Other error"); var result = SrkHtmlExtensions.HasOtherValidationErrors(html); Assert.IsTrue(result); }
public void ThrowsWhenArg0IsNull() { SrkHtmlExtensions.HasOtherValidationErrors(null); }