mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 16:51:37 +00:00
Change @BeforeClass to @Before to prevent tests failing
This commit is contained in:
+3
-2
@@ -7,6 +7,7 @@ import org.apollo.game.model.World;
|
|||||||
import org.apollo.game.model.entity.Player;
|
import org.apollo.game.model.entity.Player;
|
||||||
import org.apollo.game.model.inter.bank.BankConstants;
|
import org.apollo.game.model.inter.bank.BankConstants;
|
||||||
import org.apollo.game.model.inv.Inventory;
|
import org.apollo.game.model.inv.Inventory;
|
||||||
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
@@ -25,8 +26,8 @@ public class ItemOnItemVerificationHandlerTest {
|
|||||||
private ItemOnItemVerificationHandler itemOnItemVerificationHandler = new ItemOnItemVerificationHandler(world);
|
private ItemOnItemVerificationHandler itemOnItemVerificationHandler = new ItemOnItemVerificationHandler(world);
|
||||||
private ItemVerificationHandler itemVerificationHandler = new ItemVerificationHandler(world);
|
private ItemVerificationHandler itemVerificationHandler = new ItemVerificationHandler(world);
|
||||||
|
|
||||||
@BeforeClass
|
@Before
|
||||||
public static void setupTestItemDefinitions() {
|
public void setupTestItemDefinitions() {
|
||||||
mockStatic(ItemDefinition.class);
|
mockStatic(ItemDefinition.class);
|
||||||
when(ItemDefinition.lookup(4151)).thenReturn(new ItemDefinition(4151));
|
when(ItemDefinition.lookup(4151)).thenReturn(new ItemDefinition(4151));
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -11,6 +11,7 @@ import org.apollo.game.model.entity.Entity;
|
|||||||
import org.apollo.game.model.entity.EntityType;
|
import org.apollo.game.model.entity.EntityType;
|
||||||
import org.apollo.game.model.entity.Player;
|
import org.apollo.game.model.entity.Player;
|
||||||
import org.apollo.game.model.entity.obj.StaticGameObject;
|
import org.apollo.game.model.entity.obj.StaticGameObject;
|
||||||
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
@@ -29,8 +30,8 @@ import static org.powermock.api.mockito.PowerMockito.when;
|
|||||||
@PrepareForTest({World.class, Player.class, ObjectDefinition.class, RegionRepository.class, Region.class})
|
@PrepareForTest({World.class, Player.class, ObjectDefinition.class, RegionRepository.class, Region.class})
|
||||||
public class ObjectActionVerificationHandlerTest {
|
public class ObjectActionVerificationHandlerTest {
|
||||||
|
|
||||||
@BeforeClass
|
@Before
|
||||||
public static void setupTestObjectDefinitions() {
|
public void setupTestObjectDefinitions() {
|
||||||
mockStatic(ObjectDefinition.class);
|
mockStatic(ObjectDefinition.class);
|
||||||
when(ObjectDefinition.count()).thenReturn(4152);
|
when(ObjectDefinition.count()).thenReturn(4152);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user