예제 #1
0
            public void ModelIsPropertyInvalid_ReturnsFalse()
            {
                var model = new TestModel {
                    Name = null,
                };
                var html = GetHtmlHelper(model);

                var result = SrkHtmlExtensions.HasOtherValidationErrors(html);

                Assert.IsFalse(result);
            }
예제 #2
0
            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);
            }
예제 #3
0
 public void ThrowsWhenArg0IsNull()
 {
     SrkHtmlExtensions.HasOtherValidationErrors(null);
 }