#1473: Change tests to use suites, to run tests in different environments and feature flags

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2024-09-26 20:01:56 +10:00
parent 18f63085bb
commit fbf9dd80d4
85 changed files with 1012 additions and 302 deletions

View File

@@ -2,10 +2,11 @@ package org.bukkit.entity;
import net.minecraft.world.entity.vehicle.EntityBoat;
import org.bukkit.craftbukkit.entity.CraftBoat;
import org.bukkit.support.AbstractTestingBase;
import org.bukkit.support.environment.Normal;
import org.junit.jupiter.api.Test;
public class BoatTest extends AbstractTestingBase {
@Normal
public class BoatTest {
@Test
public void testTypes() {

View File

@@ -3,8 +3,10 @@ package org.bukkit.entity;
import static org.junit.jupiter.api.Assertions.*;
import net.minecraft.world.entity.boss.enderdragon.phases.DragonControllerPhase;
import org.bukkit.craftbukkit.entity.CraftEnderDragon;
import org.bukkit.support.environment.Normal;
import org.junit.jupiter.api.Test;
@Normal
public class EnderDragonPhaseTest {
@Test

View File

@@ -2,8 +2,10 @@ package org.bukkit.entity;
import static org.junit.jupiter.api.Assertions.*;
import net.minecraft.world.entity.EntityPose;
import org.bukkit.support.environment.Normal;
import org.junit.jupiter.api.Test;
@Normal
public class EntityPoseTest {
@Test

View File

@@ -7,10 +7,11 @@ import java.util.stream.Collectors;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.MinecraftKey;
import net.minecraft.world.entity.EntityTypes;
import org.bukkit.support.AbstractTestingBase;
import org.bukkit.support.environment.AllFeatures;
import org.junit.jupiter.api.Test;
public class EntityTypesTest extends AbstractTestingBase {
@AllFeatures
public class EntityTypesTest {
@Test
public void testMaps() {

View File

@@ -3,8 +3,10 @@ package org.bukkit.entity;
import static org.junit.jupiter.api.Assertions.*;
import net.minecraft.world.entity.animal.EntityPanda;
import org.bukkit.craftbukkit.entity.CraftPanda;
import org.bukkit.support.environment.Normal;
import org.junit.jupiter.api.Test;
@Normal
public class PandaGeneTest {
@Test

View File

@@ -2,8 +2,10 @@ package org.bukkit.entity;
import net.minecraft.world.entity.EnumCreatureType;
import org.bukkit.craftbukkit.util.CraftSpawnCategory;
import org.bukkit.support.environment.Normal;
import org.junit.jupiter.api.Test;
@Normal
public class SpawnCategoryTest {
@Test

View File

@@ -5,8 +5,10 @@ import static org.hamcrest.Matchers.*;
import org.bukkit.DyeColor;
import org.bukkit.craftbukkit.entity.CraftTropicalFish;
import org.bukkit.entity.TropicalFish.Pattern;
import org.bukkit.support.environment.Normal;
import org.junit.jupiter.api.Test;
@Normal
public class TropicalFishTest {
@Test

View File

@@ -6,11 +6,12 @@ import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.entity.ai.memory.MemoryModuleType;
import org.bukkit.Location;
import org.bukkit.craftbukkit.entity.memory.CraftMemoryKey;
import org.bukkit.support.AbstractTestingBase;
import org.bukkit.support.environment.AllFeatures;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
public class CraftMemoryKeyTest extends AbstractTestingBase {
@AllFeatures
public class CraftMemoryKeyTest {
@Test
public void shouldConvertBukkitHomeKeyToNMSRepresentation() {