Example #1
0
        public void CombineErrorMessages_Default_HasModelErrors()
        {
            var msd = new ModelStateDictionary
            {
                MaxAllowedErrors = 35
            };

            msd.AddModelError("996", "Jack Ma is an asshole");
            msd.AddModelError("251", "Use HW and be a patriot");

            var result = msd.CombineErrorMessages();

            Assert.IsNotNull(result);
            Assert.IsTrue(result.Contains("Jack Ma is an asshole"));
            Assert.IsTrue(result.Contains("Use HW and be a patriot"));
        }