Ejemplo n.º 1
0
        public void GetValidationErrorsTest()
        {
            var testObject = new ValidateableTestClass
            {
                TestProperty = String.Empty
            };
            var testhelper = new TestHelper();

            Assert.IsNull(testObject.GetValidationErrors(testhelper.Localizer, validationErrorFilterType: ValidationErrorFilterType.ErrorOnly));
            Assert.IsTrue(testObject.ValidationErrors.Count > 0);
            Assert.IsNotNull(testObject.GetValidationErrors(testhelper.Localizer, nameof(ValidateableTestClass.TestProperty)));
        }
        public void GetValidationErrorsTest()
        {
            var testObject = new ValidateableTestClass
            {
                TestProperty = String.Empty
            };

            Assert.IsNull(testObject.GetValidationErrors(validationErrorFilterType: ValidationErrorFilterType.ErrorOnly));
            Assert.IsTrue(testObject.ValidationErrors.Count > 0);
        }