mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +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.inter.bank.BankConstants;
|
||||
import org.apollo.game.model.inv.Inventory;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -25,8 +26,8 @@ public class ItemOnItemVerificationHandlerTest {
|
||||
private ItemOnItemVerificationHandler itemOnItemVerificationHandler = new ItemOnItemVerificationHandler(world);
|
||||
private ItemVerificationHandler itemVerificationHandler = new ItemVerificationHandler(world);
|
||||
|
||||
@BeforeClass
|
||||
public static void setupTestItemDefinitions() {
|
||||
@Before
|
||||
public void setupTestItemDefinitions() {
|
||||
mockStatic(ItemDefinition.class);
|
||||
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.Player;
|
||||
import org.apollo.game.model.entity.obj.StaticGameObject;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
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})
|
||||
public class ObjectActionVerificationHandlerTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void setupTestObjectDefinitions() {
|
||||
@Before
|
||||
public void setupTestObjectDefinitions() {
|
||||
mockStatic(ObjectDefinition.class);
|
||||
when(ObjectDefinition.count()).thenReturn(4152);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user