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