예제 #1
0
        public void LocalizedValidation_Works_For_NotSameAsValueValidator()
        {
            var description = new LocalizedValidatingSameAsValue()
            {
                Foo = LocalizedValidatingSameAsValue.DefaultValue
            };

            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_NotSameAsValueValidator()
        {
            var description = new LocalizedValidatingSameAsValue()
                                  {
                                      Foo = LocalizedValidatingSameAsValue.DefaultValue
                                  };

            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]);
        }