public void ValidateUser_NotASatisfyingTest_UserInvalidated()
 {
     //ARRANGE
     _service = new AuthenticationService();
     //ACT
     var result = _service.ValidateUser("VaultBoy", "Fallout");
     //ASSERT
     Assert.IsFalse(result);
 }
 public void ValidateUser_InvalidUser_WithException()
 {
     //ARRANGE
     _service = new AuthenticationService
     {
         AccountProvider = new StubIAccountProvider()
         {
             AuthenticateUserAccountStringString = (s, s1) => true,
             GetUserAccountByUsernameString = s => new UserAccount("", "", new User())
             {
                 AccountExpiration = DateTime.Now.AddDays(-10)
             }
         }
     };
     //ACT
     _service.ValidateUser("VaultBoy", "Fallout");
 }
 public void ValidateUser_ValidUser_UserValidated()
 {
     //ARRANGE
     _service = new AuthenticationService();
     _service.AccountProvider = new StubIAccountProvider()
     {
         AuthenticateUserAccountStringString = (s, s1) => true,
         GetUserAccountByUsernameString = s => new UserAccount("", "", new User())
         {
             AccountExpiration = DateTime.Now.AddDays(10),
             IsActive = true
         }
     };
     //ACT
     var result = _service.ValidateUser("VaultBoy", "Fallout");
     //ASSERT
     Assert.IsTrue(result);
 }