Exemple #1
0
        public void Sesstion_Time_Out_Valid_Session_Success()
        {
            //Arrange
            DatabaseContext      _db = new DatabaseContext();
            TestingUtils         tu  = new TestingUtils();
            SessionService       ss  = new SessionService(_db);
            AuthorizationManager _am;
            User    newUser5 = tu.CreateUserObject();
            Session ValidSession;

            //Act
            _am          = new AuthorizationManager(_db);
            newUser5     = tu.CreateUserInDb();
            ValidSession = tu.CreateSessionInDb(newUser5);
            Session TestValid = _am.ValidateAndUpdateSession(ValidSession.Token);

            //Assert
            Assert.AreEqual(TestValid.Token, ValidSession.Token);
        }
Exemple #2
0
        public void Session_Time_Out_Success()
        {
            //Arrange
            DatabaseContext      _db = new DatabaseContext();
            TestingUtils         tu  = new TestingUtils();
            SessionService       ss  = new SessionService(_db);
            AuthorizationManager _am;
            User    newUser1 = tu.CreateUserObject();
            User    newUser2 = tu.CreateUserObject();
            Session ValidSession;
            Session ExpiredSession;

            //Act
            _am            = new AuthorizationManager(_db);
            newUser1       = tu.CreateUserInDb();
            newUser2       = tu.CreateUserInDb();
            ValidSession   = tu.CreateSessionInDb(newUser1);
            ExpiredSession = tu.CreateExpiredSessionInDb(newUser2);
            //Assert
            Assert.IsNull(_am.ValidateAndUpdateSession(ExpiredSession.Token));
        }
Exemple #3
0
 public PasswordServiceUT()
 {
     //Arrange
     ps = new PasswordService();
     tu = new TestingUtils();
 }
Exemple #4
0
 public UserServiceUT()
 {
     us   = new UserService();
     tu   = new TestingUtils();
     _umm = new UserManagementManager();
 }
Exemple #5
0
 public ResetPasswordUT()
 {
     _db = new DatabaseContext();
     tu  = new TestingUtils();
     rs  = new ResetService();
 }
Exemple #6
0
 public ApiKeyServiceUT()
 {
     _db = new DatabaseContext();
     tu  = new TestingUtils();
 }
Exemple #7
0
 public AuthorizationManagerUT()
 {
     _tu = new TestingUtils();
 }
Exemple #8
0
 public UserManagerUT()
 {
     _tu = new TestingUtils();
     _um = new UserManager();
 }
Exemple #9
0
 public UserServiceUT()
 {
     tu = new TestingUtils();
 }
Exemple #10
0
 public UserManagementManagerUT()
 {
     tu = new TestingUtils();
 }
Exemple #11
0
        public ApplicationServiceUT()
        {
            var _db = new DatabaseContext();

            tu = new TestingUtils();
        }
Exemple #12
0
 public SessionServiceUT()
 {
     //Arrange
     tu = new TestingUtils();
 }
Exemple #13
0
 public PasswordManagerUT()
 {
     _db = new DatabaseContext();
     tu  = new TestingUtils();
     pm  = new PasswordManager();
 }
Exemple #14
0
 public LaunchManagerUT()
 {
     _tu = new TestingUtils();
 }
Exemple #15
0
 public ResetPasswordUT()
 {
     tu = new TestingUtils();
 }
Exemple #16
0
 public SignatureServiceUT()
 {
     tu = new TestingUtils();
 }
Exemple #17
0
 public PasswordResetManagerUT()
 {
     tu = new TestingUtils();
     ss = new SessionService(_db);
 }