use of com.djrapitops.plan.storage.database.queries.containers.ServerPlayerContainersQuery in project Plan by plan-player-analytics.
the class DatabaseTest method serverPlayerContainersQueryDoesNotReturnDuplicatePlayers.
@Test
default void serverPlayerContainersQueryDoesNotReturnDuplicatePlayers() {
db().executeTransaction(TestData.storeServers());
executeTransactions(TestData.storePlayerOneData());
executeTransactions(TestData.storePlayerTwoData());
List<UUID> expected = Arrays.asList(playerUUID, player2UUID);
Collections.sort(expected);
Collection<UUID> result = db().query(new ServerPlayerContainersQuery(TestConstants.SERVER_UUID)).stream().map(player -> player.getUnsafe(PlayerKeys.UUID)).sorted().collect(Collectors.toList());
assertEquals(expected, result);
}
Aggregations