public void UserIsLocked() { const string connectionString = "./users.xml"; const int passwordExpiryDays = 90; const int accountLockoutThreshold = 9; const int lockoutDurationMinutes = 10; var userCommandRepository = new XmlUserAccountCommandRepository(connectionString); var userQueryRepository = new XmlUserAccountQueryRepository(connectionString); var retVal = new LoginProcess(userCommandRepository, userQueryRepository, passwordExpiryDays, accountLockoutThreshold, lockoutDurationMinutes) .Login("shibu_locked", "password"); Assert.IsNotNullOrEmpty(retVal, "User is Expected to be Locked, but is not locked"); }
public void UserIsAuthenticated() { const string connectionString = "./users.xml"; const int passwordExpiryDays = 90; const int accountLockoutThreshold = 9; const int lockoutDurationMinutes = 10; var userCommandRepository = new XmlUserAccountCommandRepository(connectionString); var userQueryRepository = new XmlUserAccountQueryRepository(connectionString); var retVal = new LoginProcess(userCommandRepository, userQueryRepository, passwordExpiryDays, accountLockoutThreshold, lockoutDurationMinutes) .Login("shibu", "password"); Assert.IsEmpty(retVal, "User Authentication Expected to Pass, but Failed"); }