public void Can_Get_Email_By_UserName_Expecting_Valid_Email() { var variableToken = DateTime.Now.ToLongTimeString(); const string username = "******"; const string email = "*****@*****.**"; const string woFs = "myTwoFactorSecret"; const string pwd = "password"; _uow = new SimpleMembershipUnitOfWorkAsync(_dataContextAsync, _loggingService); _simpleMembershipService = new WebSecurity(_uow, _loggingService); if (!_simpleMembershipService.FoundUser(username)) { var token = _simpleMembershipService.CreateUserAndAccount(username, pwd, email, true); CreatedTestUsers.Add(username); Assert.IsNotNull(token, "Token for selected username: [ " + username + " ] was *null*. "); } var actualEmail = _simpleMembershipService.GetEmail(username); // We expect to get a valid email address... Assert.AreEqual(actualEmail, email, "Emails do not match. Expected: [ " + email + " ], but instead found: [ " + actualEmail.Trim() + " ]. "); }