mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-07 19:31:37 +01:00
bulkAll and bulkAllOrder
This commit is contained in:
parent
29bbc39a1a
commit
2eae1e2cdc
@ -136,6 +136,23 @@ public class PaletteTest {
|
||||
|
||||
@Test
|
||||
public void bulkAll() {
|
||||
var palettes = testPalettes();
|
||||
for (Palette palette : palettes) {
|
||||
// Fill all entries
|
||||
palette.setAll((x, y, z) -> x + y + z + 1);
|
||||
palette.getAll((x, y, z, value) -> assertEquals(x + y + z + 1, value));
|
||||
|
||||
// Replacing
|
||||
palette.replaceAll((x, y, z, value) -> {
|
||||
assertEquals(x + y + z + 1, value);
|
||||
return x + y + z + 2;
|
||||
});
|
||||
palette.getAll((x, y, z, value) -> assertEquals(x + y + z + 2, value));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void bulkAllOrder() {
|
||||
var palettes = testPalettes();
|
||||
for (Palette palette : palettes) {
|
||||
AtomicInteger count = new AtomicInteger();
|
||||
|
Loading…
Reference in New Issue
Block a user