Fixed broken test

This commit is contained in:
Rsl1122 2017-10-06 17:41:30 +03:00
parent a268a092d7
commit 9e5b5566c7

View File

@ -1,9 +1,14 @@
package main.java.com.djrapitops.plan.systems.cache;
import main.java.com.djrapitops.plan.data.Session;
import org.bukkit.plugin.java.JavaPlugin;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import test.java.utils.MockUtils;
import test.java.utils.TestInit;
import java.util.Optional;
import java.util.UUID;
@ -11,6 +16,8 @@ import java.util.UUID;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@RunWith(PowerMockRunner.class)
@PrepareForTest(JavaPlugin.class)
public class SessionCacheTest {
private final UUID uuid = MockUtils.getPlayerUUID();
@ -18,7 +25,8 @@ public class SessionCacheTest {
private Session session;
@Before
public void setUp() {
public void setUp() throws Exception {
TestInit t = TestInit.init();
sessionCache = new SessionCache(null);
session = new Session(12345L, "World1", "SURVIVAL");
sessionCache.cacheSession(uuid, session);