Exemple #1
0
 private void AddErrors(SeIdentityResult result)
 {
     foreach (var error in result.Errors)
     {
         ModelState.AddModelError("", error);
     }
 }
Exemple #2
0
 private void AssertValidationResultFailed(SeIdentityResult result, string errorMessageContains)
 {
     Assert.IsFalse(result.Succeeded);
     Assert.AreEqual(1, result.Errors.Count());
     if (!string.IsNullOrEmpty(errorMessageContains))
     {
         Assert.IsTrue(result.Errors.All(a => a.Contains(errorMessageContains)));
     }
 }