use of com.djrapitops.plan.storage.database.transactions.commands.RemoveEverythingTransaction in project Plan by plan-player-analytics.
the class DBPatchSQLiteRegressionTest method sqlitePatchesAreApplied.
@Test
void sqlitePatchesAreApplied() {
Patch[] patches = underTest.patches();
for (Patch patch : patches) {
underTest.executeTransaction(patch);
}
assertPatchesHaveBeenApplied(patches);
// Make sure that a fetch works.
PlayerContainer player = underTest.query(ContainerFetchQueries.fetchPlayerContainer(TestConstants.PLAYER_ONE_UUID));
OptionalAssert.equals(1, player.getValue(PlayerKeys.PLAYER_KILL_COUNT));
// Make sure no foreign key checks fail on removal
underTest.executeTransaction(new RemoveEverythingTransaction());
}
use of com.djrapitops.plan.storage.database.transactions.commands.RemoveEverythingTransaction in project Plan by plan-player-analytics.
the class UserInfoQueriesTest method removeEverythingRemovesBaseUsers.
@Test
default void removeEverythingRemovesBaseUsers() {
playerIsRegisteredToUsersTable();
db().executeTransaction(new RemoveEverythingTransaction());
assertTrue(db().query(BaseUserQueries.fetchAllBaseUsers()).isEmpty());
}
use of com.djrapitops.plan.storage.database.transactions.commands.RemoveEverythingTransaction in project Plan by plan-player-analytics.
the class PingQueriesTest method removeEverythingRemovesPing.
@Test
default void removeEverythingRemovesPing() {
pingIsStored();
db().executeTransaction(new RemoveEverythingTransaction());
assertTrue(db().query(PingQueries.fetchAllPingData()).isEmpty());
}
Aggregations