package com.example.tests;
import com.frotty27.hrtk.api.annotation.HytaleSuite;
import com.frotty27.hrtk.api.annotation.HytaleTest;
import com.frotty27.hrtk.api.annotation.WorldTest;
import com.frotty27.hrtk.api.annotation.Tag;
import com.frotty27.hrtk.api.annotation.DisplayName;
import com.frotty27.hrtk.api.annotation.Order;
import com.frotty27.hrtk.api.assert_.HytaleAssert;
import com.frotty27.hrtk.api.assert_.PlayerAssert;
import com.frotty27.hrtk.api.context.TestContext;
import com.frotty27.hrtk.api.context.WorldTestContext;
import com.frotty27.hrtk.api.lifecycle.IsolationStrategy;
@HytaleSuite(value = "Player Surface Tests", isolation = IsolationStrategy.DEDICATED_WORLD)
@Tag("players")
public class PlayerSurfaceTests {
@HytaleTest
@Order(1)
@DisplayName("Create a mock player and verify its name")
void createMockPlayerAndVerifyName(TestContext ctx) {
Object player = ctx.createMockPlayer("Frotty27");
PlayerAssert.assertPlayerName(player, "Frotty27");
}
@HytaleTest
@Order(2)
@DisplayName("Verify game mode on a mock player")
void verifyGameMode(TestContext ctx) {
Object player = ctx.createMockPlayer("ArenaPlayer");
PlayerAssert.assertGameMode(player, "creative");
}
@WorldTest
@Order(3)
@DisplayName("Mock player is assigned to the test world")
void playerIsInTestWorld(WorldTestContext ctx) {
Object player = ctx.createMockPlayer("WorldTester");
PlayerAssert.assertPlayerInWorld(player, "overworld");
}
@WorldTest
@Order(4)
@DisplayName("Mock player is alive after creation")
void mockPlayerIsAlive(WorldTestContext ctx) {
Object player = ctx.createMockPlayer("HealthyPlayer");
PlayerAssert.assertPlayerAlive(ctx.getStore(), player);
}
}