()
| 648 | } |
| 649 | |
| 650 | @Test |
| 651 | public void testUnSuspendUser() |
| 652 | { |
| 653 | String userName = new String("UnsuspendedUser"); |
| 654 | try |
| 655 | { |
| 656 | log.debug("Checking User Name in DB"); |
| 657 | if(!GetterTest.verifyTestUser(applicationRoot, userName, userName)) |
| 658 | { |
| 659 | fail("Could not Verify User"); |
| 660 | } |
| 661 | else |
| 662 | { |
| 663 | String userId = Getter.getUserIdFromName(applicationRoot, userName); |
| 664 | if(!Setter.suspendUser(applicationRoot, userId, 10)) |
| 665 | { |
| 666 | fail("Could not suspend User"); |
| 667 | } |
| 668 | else |
| 669 | { |
| 670 | if(!Setter.unSuspendUser(applicationRoot, userId)) |
| 671 | { |
| 672 | fail("Could not unsusepend user"); |
| 673 | } |
| 674 | else |
| 675 | { |
| 676 | //Gotta Sleep for a sec, otherwise the time compair will round down and user auth will fail. User is unsuspended 1 second after unsuspend funciton |
| 677 | Thread.sleep(1000); |
| 678 | String user[] = Getter.authUser(applicationRoot, userName, userName); |
| 679 | if(user == null || user[0].isEmpty()) |
| 680 | { |
| 681 | fail("Could not Authenticate after unsuspension"); |
| 682 | } |
| 683 | else |
| 684 | { |
| 685 | return;// PASS: User Could not Authenticate after unsuspension |
| 686 | } |
| 687 | } |
| 688 | } |
| 689 | } |
| 690 | } |
| 691 | catch(Exception e) |
| 692 | { |
| 693 | log.fatal("Could not complete testUnSuspendUser: " + e.toString()); |
| 694 | fail("Could not complete testUnSuspendUser"); |
| 695 | } |
| 696 | } |
| 697 | |
| 698 | @Test |
| 699 | public void testUpdatePassword() |
nothing calls this directly
no test coverage detected