Esempio n. 1
0
            public void ModelIsPropertyInvalid_ReturnsFalse()
            {
                var model = new TestModel {
                    Name = null,
                };
                var html = GetHtmlHelper(model);

                var result = SrkHtmlExtensions.HasOtherValidationErrors(html);

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