25 lines
844 B
Java
25 lines
844 B
Java
package games.dmg.spigotbase;
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
|
|
import java.util.Map;
|
|
import java.util.UUID;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
final class SpawnableOverlayProgressionServiceTest {
|
|
@Test
|
|
void twoHundredFiftiethPlacementUnlocksOverlay() {
|
|
PlayerState player = PlayerState.newPlayer(UUID.randomUUID(), "Builder")
|
|
.withTotalBlocksPlaced(249);
|
|
SpawnableOverlayProgressionService service = new SpawnableOverlayProgressionService(
|
|
new PluginSettingsProvider(PluginSettings.from(Map.of()))
|
|
);
|
|
|
|
SpawnableOverlayProgressionUpdate update = service.recordPlacement(player);
|
|
|
|
assertEquals(250, update.player().totalBlocksPlaced());
|
|
assertTrue(update.unlocked());
|
|
}
|
|
}
|