Change @BeforeClass to @Before to prevent tests failing

This commit is contained in:
Gary Tierney
2015-09-13 01:46:59 +01:00
parent a21b6581d6
commit 15f5d4a36e
2 changed files with 6 additions and 4 deletions
@@ -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));
}
@@ -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);
}