()
| 1113 | |
| 1114 | |
| 1115 | @Test |
| 1116 | public void testUserDelete() |
| 1117 | { |
| 1118 | String testUsername = "testuserdelete"; |
| 1119 | String testuserId = Getter.getUserIdFromName(applicationRoot, testUsername); |
| 1120 | |
| 1121 | try { |
| 1122 | if(testuserId == null || testuserId.isEmpty()) |
| 1123 | assert(Setter.userCreate(applicationRoot, null, testUsername, testUsername, "player", testUsername+"@test.com", false)); |
| 1124 | |
| 1125 | testuserId = Getter.getUserIdFromName(applicationRoot, testUsername); |
| 1126 | assert(testuserId != null && !testuserId.isEmpty()); |
| 1127 | |
| 1128 | assert(Setter.userDelete(applicationRoot, testuserId)); |
| 1129 | |
| 1130 | testuserId = Getter.getUserIdFromName(applicationRoot, testUsername); |
| 1131 | assert(testuserId == null || testuserId.isEmpty()); |
| 1132 | |
| 1133 | } catch (SQLException sqlEx) { |
| 1134 | log.fatal("DB Error: " + sqlEx.toString()); |
| 1135 | fail("Could not Complete testUserDelete because DB Error"); |
| 1136 | } |
| 1137 | } |
| 1138 | } |
nothing calls this directly
no test coverage detected