diff --git a/Plan/common/src/test/java/com/djrapitops/plan/delivery/webserver/auth/ActiveCookieStoreTest.java b/Plan/common/src/test/java/com/djrapitops/plan/delivery/webserver/auth/ActiveCookieStoreTest.java index 48cea6509..0f480b333 100644 --- a/Plan/common/src/test/java/com/djrapitops/plan/delivery/webserver/auth/ActiveCookieStoreTest.java +++ b/Plan/common/src/test/java/com/djrapitops/plan/delivery/webserver/auth/ActiveCookieStoreTest.java @@ -23,11 +23,11 @@ import com.djrapitops.plan.settings.config.PlanConfig; import com.djrapitops.plan.storage.database.DBSystem; import com.djrapitops.plan.storage.database.Database; import com.djrapitops.plan.utilities.PassEncryptUtil; -import net.playeranalytics.plugin.scheduling.RunnableFactory; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import utilities.TestConstants; +import utilities.mocks.objects.TestRunnableFactory; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -47,7 +47,7 @@ class ActiveCookieStoreTest { underTest = new ActiveCookieStore( Mockito.mock(PlanConfig.class), dbSystem, - Mockito.mock(RunnableFactory.class), + new TestRunnableFactory(), Mockito.mock(Processing.class) ); user = new User(TestConstants.PLAYER_ONE_NAME, "console", null, PassEncryptUtil.createHash("testPass"), 0, WebUser.getPermissionsForLevel(0)); diff --git a/Plan/common/src/test/java/com/djrapitops/plan/storage/database/queries/WebUserQueriesTest.java b/Plan/common/src/test/java/com/djrapitops/plan/storage/database/queries/WebUserQueriesTest.java index d47cd3f7a..7fcb1de98 100644 --- a/Plan/common/src/test/java/com/djrapitops/plan/storage/database/queries/WebUserQueriesTest.java +++ b/Plan/common/src/test/java/com/djrapitops/plan/storage/database/queries/WebUserQueriesTest.java @@ -27,10 +27,10 @@ import com.djrapitops.plan.storage.database.transactions.commands.RegisterWebUse import com.djrapitops.plan.storage.database.transactions.commands.RemoveEverythingTransaction; import com.djrapitops.plan.storage.database.transactions.commands.RemoveWebUserTransaction; import com.djrapitops.plan.utilities.PassEncryptUtil; -import net.playeranalytics.plugin.scheduling.RunnableFactory; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import utilities.TestConstants; +import utilities.mocks.objects.TestRunnableFactory; import java.util.Collections; import java.util.Map; @@ -78,7 +78,7 @@ public interface WebUserQueriesTest extends DatabaseTestPreparer { userIsRegistered(); User user = db().query(WebUserQueries.fetchUser(WEB_USERNAME)).orElseThrow(AssertionError::new); - ActiveCookieStore cookieStore = new ActiveCookieStore(Mockito.mock(PlanConfig.class), dbSystem(), Mockito.mock(RunnableFactory.class), Mockito.mock(Processing.class)); + ActiveCookieStore cookieStore = new ActiveCookieStore(Mockito.mock(PlanConfig.class), dbSystem(), new TestRunnableFactory(), Mockito.mock(Processing.class)); String cookie = cookieStore.generateNewCookie(user); @@ -92,7 +92,7 @@ public interface WebUserQueriesTest extends DatabaseTestPreparer { userIsRegistered(); User user = db().query(WebUserQueries.fetchUser(WEB_USERNAME)).orElseThrow(AssertionError::new); - ActiveCookieStore cookieStore = new ActiveCookieStore(Mockito.mock(PlanConfig.class), dbSystem(), Mockito.mock(RunnableFactory.class), Mockito.mock(Processing.class)); + ActiveCookieStore cookieStore = new ActiveCookieStore(Mockito.mock(PlanConfig.class), dbSystem(), new TestRunnableFactory(), Mockito.mock(Processing.class)); String cookie = cookieStore.generateNewCookie(user); @@ -106,7 +106,7 @@ public interface WebUserQueriesTest extends DatabaseTestPreparer { userIsRegistered(); User user = db().query(WebUserQueries.fetchUser(WEB_USERNAME)).orElseThrow(AssertionError::new); - ActiveCookieStore cookieStore = new ActiveCookieStore(Mockito.mock(PlanConfig.class), dbSystem(), Mockito.mock(RunnableFactory.class), Mockito.mock(Processing.class)); + ActiveCookieStore cookieStore = new ActiveCookieStore(Mockito.mock(PlanConfig.class), dbSystem(), new TestRunnableFactory(), Mockito.mock(Processing.class)); String cookie = cookieStore.generateNewCookie(user);