public void TryManualLogin_NullPassword() { IUsersStorageProviderV40 prov = GetProvider(); prov.AddUser("user", null, "password", "*****@*****.**", true, DateTime.Now); prov.TryManualLogin("user", null); }
public void TryManualLogin() { IUsersStorageProviderV40 prov = GetProvider(); UserInfo user = prov.AddUser("user", null, "password", "*****@*****.**", true, DateTime.UtcNow); prov.AddUser("user2", null, "password", "*****@*****.**", false, DateTime.UtcNow); UserInfo output = prov.TryManualLogin("inexistent", "password"); Assert.IsNull(output, "TryManualLogin should return null"); output = prov.TryManualLogin("inexistent", ""); Assert.IsNull(output, "TryManualLogin should return null"); output = prov.TryManualLogin("", "password"); Assert.IsNull(output, "TryManualLogin should return null"); output = prov.TryManualLogin("user2", "password"); Assert.IsNull(output, "TryManualLogin should return null because the account is inactive"); output = prov.TryManualLogin("user", "password"); AssertUserInfosAreEqual(user, output, true); }
public void TryManualLogin_NullUsername() { IUsersStorageProviderV40 prov = GetProvider(); prov.TryManualLogin(null, "password"); }