Пример #1
0
        public void LocalizedValidation_Works_For_SetValidator()
        {
            var description = new LocalizedValidatingSet()
            {
                Foo = "not in set"
            };

            runner.IsValid(description);
            ErrorSummary summary = runner.GetErrorSummary(description);

            Assert.IsNotNull(summary);
            Assert.AreEqual(Messages.CorrectlyLocalized_DescriptionValidateNonEmpty, summary.ErrorMessages[0]);
            Assert.AreEqual(Messages.CorrectlyLocalized_Description, summary.InvalidProperties[0]);
        }
        public void LocalizedValidation_Works_For_SetValidator()
        {
            var description = new LocalizedValidatingSet()
                                  {
                                      Foo = "not in set"
                                  };

            runner.IsValid(description);
            ErrorSummary summary = runner.GetErrorSummary(description);

            Assert.IsNotNull(summary);
            Assert.AreEqual(Messages.CorrectlyLocalized_DescriptionValidateNonEmpty, summary.ErrorMessages[0]);
            Assert.AreEqual(Messages.CorrectlyLocalized_Description, summary.InvalidProperties[0]);
        }