mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-06-26 06:34:56 +02:00
Removed JUnit 4
This commit is contained in:
parent
aca9d22e1f
commit
b339800650
|
@ -17,8 +17,6 @@
|
|||
package com.djrapitops.plan.delivery.web.resolver.request;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
|
@ -29,7 +27,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class URIPathTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -20,8 +20,6 @@ import com.djrapitops.plan.extension.DataExtension;
|
|||
import com.djrapitops.plan.extension.Group;
|
||||
import com.djrapitops.plan.extension.annotation.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -35,7 +33,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class ExtensionExtractorTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -30,7 +30,7 @@ def determineBuildVersion = {
|
|||
def buildVersion = determineBuildVersion()
|
||||
|
||||
allprojects {
|
||||
wrapper.gradleVersion = "5.5.1"
|
||||
wrapper.gradleVersion = "6.2.1"
|
||||
|
||||
group "com.djrapitops"
|
||||
version "5.0-SNAPSHOT"
|
||||
|
@ -40,14 +40,6 @@ allprojects {
|
|||
ext.buildVersion = buildVersion
|
||||
ext.fullVersion = project.ext.majorVersion + '.' + project.ext.minorVersion + ' build ' + project.ext.buildVersion
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events "passed", "failed"
|
||||
exceptionFormat "full"
|
||||
}
|
||||
}
|
||||
|
||||
// Fix for UTF-8 files showing with wrong encoding when compiled on Windows machines.
|
||||
compileJava { options.encoding = "UTF-8" }
|
||||
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
|
||||
|
@ -68,8 +60,8 @@ subprojects {
|
|||
apply plugin: "checkstyle"
|
||||
apply plugin: "jacoco"
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
ext.daggerVersion = "2.26"
|
||||
ext.daggerCompilerVersion = "2.26"
|
||||
|
@ -138,8 +130,8 @@ subprojects {
|
|||
testAnnotationProcessor "com.google.dagger:dagger-compiler:$daggerCompilerVersion"
|
||||
|
||||
// Test Tooling Dependencies
|
||||
testCompile "org.junit.jupiter:junit-jupiter-engine:5.6.0" // JUnit 5
|
||||
testCompile "org.junit.platform:junit-platform-runner:1.6.0" // JUnit 4 runner for JUnit 5 tests
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
|
||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.6.0" // JUnit 5
|
||||
testCompile "org.junit.jupiter:junit-jupiter-params:5.6.0" // JUnit 5, parameterized tests
|
||||
testCompile "org.mockito:mockito-core:3.3.0" // Mockito Core
|
||||
testCompile "org.mockito:mockito-junit-jupiter:3.3.0" // Mockito JUnit 5 Extension
|
||||
|
@ -163,8 +155,16 @@ subprojects {
|
|||
testArtifacts testJar
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events "passed", "failed", "skipped"
|
||||
exceptionFormat "full"
|
||||
}
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
configDir = file("$rootProject.projectDir/config/checkstyle")
|
||||
getConfigDirectory().set file("$rootProject.projectDir/config/checkstyle")
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
|
|
|
@ -27,8 +27,6 @@ import com.djrapitops.plan.storage.database.queries.objects.ServerQueries;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
import utilities.mocks.BukkitMockComponent;
|
||||
|
||||
|
@ -45,7 +43,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class BukkitSystemTest {
|
||||
|
||||
private final int TEST_PORT_NUMBER = RandomData.randomInt(9005, 9500);
|
||||
|
|
|
@ -26,8 +26,6 @@ import org.bukkit.event.player.PlayerMoveEvent;
|
|||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import utilities.TestConstants;
|
||||
|
@ -41,7 +39,6 @@ import static org.mockito.Mockito.*;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
public class BukkitAFKListenerTest {
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public class PlanBukkitMocker extends Mocker {
|
|||
ErrorHandler consoleErrorLogger = new ConsoleErrorLogger(testPluginLogger);
|
||||
Timings timings = new Timings(debugLogger);
|
||||
|
||||
Mockito.doReturn(testLogger).when(planMock).getLogger();
|
||||
doReturn(testLogger).when(planMock).getLogger();
|
||||
doReturn(runnableFactory).when(planMock).getRunnableFactory();
|
||||
doReturn(testPluginLogger).when(planMock).getPluginLogger();
|
||||
doReturn(debugLogger).when(planMock).getDebugLogger();
|
||||
|
@ -99,7 +99,7 @@ public class PlanBukkitMocker extends Mocker {
|
|||
return this;
|
||||
}
|
||||
|
||||
PlanBukkitMocker withResourceFetchingFromJar() throws IOException {
|
||||
PlanBukkitMocker withResourceFetchingFromJar() {
|
||||
withPluginFiles();
|
||||
return this;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class PlanBukkitMocker extends Mocker {
|
|||
doReturn(25565).when(serverMock).getPort();
|
||||
doReturn("1.12.2").when(serverMock).getVersion();
|
||||
doReturn("32423").when(serverMock).getBukkitVersion();
|
||||
Mockito.doReturn(TestConstants.SERVER_MAX_PLAYERS).when(serverMock).getMaxPlayers();
|
||||
doReturn(TestConstants.SERVER_MAX_PLAYERS).when(serverMock).getMaxPlayers();
|
||||
ConsoleCommandSender sender = Mockito.mock(ConsoleCommandSender.class);
|
||||
doReturn(sender).when(serverMock).getConsoleSender();
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ import com.google.common.util.concurrent.MoreExecutors;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.DBPreparer;
|
||||
import utilities.RandomData;
|
||||
import utilities.mocks.BungeeMockComponent;
|
||||
|
@ -42,7 +40,6 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class BungeeSystemTest {
|
||||
|
||||
private final int TEST_PORT_NUMBER = RandomData.randomInt(9005, 9500);
|
||||
|
|
|
@ -19,8 +19,6 @@ package com.djrapitops.plan.delivery.domain.containers;
|
|||
import com.djrapitops.plan.delivery.domain.keys.Key;
|
||||
import com.djrapitops.plan.delivery.domain.keys.Type;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -33,7 +31,6 @@ import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class KeyTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -20,8 +20,6 @@ import com.djrapitops.plan.delivery.domain.container.DataContainer;
|
|||
import com.djrapitops.plan.delivery.domain.container.SupplierDataContainer;
|
||||
import com.djrapitops.plan.delivery.domain.keys.Key;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
|
@ -30,7 +28,6 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class SupplierDataContainerTest {
|
||||
|
||||
private static final Key<String> TEST_KEY = new Key<>(String.class, "TEST_KEY");
|
||||
|
|
|
@ -21,8 +21,6 @@ import com.djrapitops.plan.gathering.domain.builders.TPSBuilder;
|
|||
import com.djrapitops.plugin.api.TimeAmount;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -37,7 +35,6 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class TPSMutatorTest {
|
||||
|
||||
private static List<TPS> testData;
|
||||
|
|
|
@ -21,8 +21,6 @@ import com.djrapitops.plan.settings.config.PlanConfig;
|
|||
import com.djrapitops.plan.settings.config.paths.FormatSettings;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
@ -33,7 +31,6 @@ import static org.mockito.Mockito.when;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class DecimalFormatterTest {
|
||||
|
||||
private DecimalFormatter underTest;
|
||||
|
|
|
@ -21,8 +21,6 @@ import com.djrapitops.plan.settings.config.PlanConfig;
|
|||
import com.djrapitops.plan.settings.config.paths.FormatSettings;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -35,7 +33,6 @@ import static org.mockito.Mockito.when;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class TimeAmountFormatterDefaultTest {
|
||||
|
||||
private static TimeAmountFormatter underTest;
|
||||
|
|
|
@ -21,8 +21,6 @@ import com.djrapitops.plan.settings.config.PlanConfig;
|
|||
import com.djrapitops.plan.settings.config.paths.FormatSettings;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -35,7 +33,6 @@ import static org.mockito.Mockito.when;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class TimeAmountFormatterExtraZerosTest {
|
||||
|
||||
private static TimeAmountFormatter underTest;
|
||||
|
|
|
@ -18,8 +18,6 @@ package com.djrapitops.plan.delivery.rendering.html;
|
|||
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
|
@ -28,7 +26,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class HtmlTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -20,8 +20,6 @@ import com.djrapitops.plan.delivery.domain.mutators.TPSMutator;
|
|||
import com.djrapitops.plan.gathering.domain.TPS;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -34,7 +32,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class LineGraphTest {
|
||||
|
||||
private static List<TPS> DATA;
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
package com.djrapitops.plan.delivery.rendering.json.graphs.special;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
@ -32,7 +30,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class WorldMapTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -32,8 +32,6 @@ import org.junit.jupiter.api.BeforeAll;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import utilities.RandomData;
|
||||
import utilities.TestConstants;
|
||||
|
@ -52,7 +50,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
|||
* - Automatic formatting of plugin javascript (See https://github.com/Rsl1122/Plan-PlayerAnalytics/issues/820)
|
||||
* - Missing file definition in Mocker
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(SeleniumExtension.class)
|
||||
class JSErrorRegressionTest {
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@ import com.djrapitops.plan.utilities.PassEncryptUtil;
|
|||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
import utilities.TestResources;
|
||||
import utilities.mocks.PluginMockComponent;
|
||||
|
@ -34,7 +32,6 @@ import utilities.mocks.PluginMockComponent;
|
|||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class JksHttpsServerTest implements HttpsServerTest {
|
||||
|
||||
private static final int TEST_PORT_NUMBER = RandomData.randomInt(9005, 9500);
|
||||
|
|
|
@ -26,8 +26,6 @@ import com.djrapitops.plan.utilities.PassEncryptUtil;
|
|||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
import utilities.TestResources;
|
||||
import utilities.mocks.PluginMockComponent;
|
||||
|
@ -37,7 +35,6 @@ import java.nio.file.Files;
|
|||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class Pkcs12HttpsServerTest implements HttpsServerTest {
|
||||
|
||||
private static final int TEST_PORT_NUMBER = RandomData.randomInt(9005, 9500);
|
||||
|
|
|
@ -18,8 +18,6 @@ package com.djrapitops.plan.delivery.webserver.cache;
|
|||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
@ -32,7 +30,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class JSONCacheTest {
|
||||
|
||||
private static final String CACHED = "Cached";
|
||||
|
|
|
@ -36,8 +36,6 @@ import org.junit.jupiter.api.BeforeEach;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.TestConstants;
|
||||
import utilities.dagger.DaggerPlanPluginComponent;
|
||||
import utilities.dagger.PlanPluginComponent;
|
||||
|
@ -56,7 +54,6 @@ import static org.mockito.Mockito.when;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(PrintExtension.class)
|
||||
class ShutdownSaveTest {
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ import com.djrapitops.plan.gathering.domain.Session;
|
|||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.TestConstants;
|
||||
|
||||
import java.util.Optional;
|
||||
|
@ -30,7 +28,6 @@ import java.util.UUID;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class SessionCacheTest {
|
||||
|
||||
private Session session;
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
package com.djrapitops.plan.gathering.domain;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
@ -29,7 +27,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class GMTimesTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
package com.djrapitops.plan.gathering.domain;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -31,7 +29,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class PlayerKillTest {
|
||||
|
||||
private String weapon = RandomData.randomString(10);
|
||||
|
|
|
@ -19,8 +19,6 @@ package com.djrapitops.plan.gathering.domain;
|
|||
import com.djrapitops.plan.delivery.domain.container.DataContainer;
|
||||
import com.djrapitops.plan.delivery.domain.keys.SessionKeys;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
import utilities.TestConstants;
|
||||
|
||||
|
@ -35,7 +33,6 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class SessionTest {
|
||||
|
||||
private final UUID serverUUID = TestConstants.SERVER_UUID;
|
||||
|
|
|
@ -18,8 +18,6 @@ package com.djrapitops.plan.gathering.domain;
|
|||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -31,7 +29,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class WorldTimesTest {
|
||||
|
||||
private final String worldOne = "ONE";
|
||||
|
|
|
@ -27,8 +27,6 @@ import org.junit.jupiter.api.BeforeEach;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import utilities.mocks.objects.TestRunnableFactory;
|
||||
|
@ -50,7 +48,6 @@ import static org.mockito.Mockito.when;
|
|||
* @author Rsl1122
|
||||
* @author Fuzzlemann
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class GeolocationTest {
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ import com.djrapitops.plan.gathering.domain.PlayerKill;
|
|||
import com.djrapitops.plan.gathering.domain.TPS;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
import utilities.TestConstants;
|
||||
|
||||
|
@ -38,7 +36,6 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
*
|
||||
* @author Fuzzlemann
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class ImportBuilderTest {
|
||||
|
||||
private int randomInt = RandomData.randomInt(0, 10);
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
package com.djrapitops.plan.identification;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -29,7 +27,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class UUIDUtilityTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -24,8 +24,6 @@ import org.junit.jupiter.api.BeforeAll;
|
|||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.FieldFetcher;
|
||||
import utilities.TestResources;
|
||||
|
||||
|
@ -45,7 +43,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class ConfigSettingKeyTest {
|
||||
|
||||
public static Path temporaryFolder;
|
||||
|
|
|
@ -18,8 +18,6 @@ package com.djrapitops.plan.settings.config;
|
|||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -28,7 +26,6 @@ import java.util.Optional;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class ConfigNodeTest {
|
||||
|
||||
private static final String SIMPLE_STRING_NODE = "Simple_string_node";
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
package com.djrapitops.plan.settings.config;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Scanner;
|
||||
|
@ -30,7 +28,6 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class ConfigReaderTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -20,8 +20,6 @@ import com.djrapitops.plan.storage.file.FileResource;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.TestResources;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -39,7 +37,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class ConfigWriterTest {
|
||||
|
||||
private Path tempFolder;
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
package com.djrapitops.plan.settings.config;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.util.Optional;
|
||||
|
@ -31,7 +29,6 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class TimeZoneUtilityTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -22,8 +22,6 @@ import org.junit.jupiter.api.BeforeEach;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
@ -31,7 +29,6 @@ import java.util.Scanner;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class ConfigChangeTest {
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ import com.djrapitops.plugin.logging.error.ConsoleErrorLogger;
|
|||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.TestResources;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -45,7 +43,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class ConfigUpdaterTest {
|
||||
|
||||
@TempDir
|
||||
|
|
|
@ -19,8 +19,6 @@ package com.djrapitops.plan.settings.locale;
|
|||
import com.djrapitops.plan.storage.file.FileResource;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -33,7 +31,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class LocaleFileWriterTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -17,12 +17,9 @@
|
|||
package com.djrapitops.plan.settings.locale;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class LocaleSystemTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -20,8 +20,6 @@ import com.jayway.awaitility.Awaitility;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -34,7 +32,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class FileWatcherTest {
|
||||
|
||||
private Path temporaryDir;
|
||||
|
@ -73,7 +70,7 @@ class FileWatcherTest {
|
|||
}
|
||||
|
||||
private void createAndModifyFile(File modified) throws IOException {
|
||||
modified.createNewFile();
|
||||
Files.createFile(modified.toPath());
|
||||
Files.write(modified.toPath(), Collections.singletonList("DataToWrite"), StandardCharsets.UTF_8);
|
||||
Files.write(modified.toPath(), Collections.singletonList("OverWrite"), StandardCharsets.UTF_8);
|
||||
}
|
||||
|
|
|
@ -28,8 +28,6 @@ import com.djrapitops.plan.storage.database.transactions.patches.Patch;
|
|||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
import org.junit.jupiter.api.*;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.OptionalAssert;
|
||||
import utilities.TestConstants;
|
||||
import utilities.mocks.PluginMockComponent;
|
||||
|
@ -41,7 +39,6 @@ import java.nio.file.Path;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class DBPatchH2RegressionTest extends DBPatchRegressionTest {
|
||||
|
||||
private static PluginMockComponent component;
|
||||
|
|
|
@ -27,8 +27,6 @@ import com.djrapitops.plan.storage.database.transactions.patches.KillsOptimizati
|
|||
import com.djrapitops.plan.storage.database.transactions.patches.Patch;
|
||||
import org.junit.jupiter.api.*;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.*;
|
||||
import utilities.mocks.PluginMockComponent;
|
||||
|
||||
|
@ -43,7 +41,6 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class DBPatchMySQLRegressionTest extends DBPatchRegressionTest {
|
||||
|
||||
private static final int TEST_PORT_NUMBER = RandomData.randomInt(9005, 9500);
|
||||
|
|
|
@ -28,8 +28,6 @@ import org.junit.jupiter.api.AfterEach;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.OptionalAssert;
|
||||
import utilities.TestConstants;
|
||||
import utilities.mocks.PluginMockComponent;
|
||||
|
@ -41,7 +39,6 @@ import java.nio.file.Path;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class DBPatchSQLiteRegressionTest extends DBPatchRegressionTest {
|
||||
|
||||
private PluginMockComponent component;
|
||||
|
|
|
@ -21,8 +21,6 @@ import org.junit.jupiter.api.AfterAll;
|
|||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import utilities.DBPreparer;
|
||||
import utilities.RandomData;
|
||||
|
@ -37,7 +35,6 @@ import java.util.UUID;
|
|||
* @author Rsl1122, Fuzzlemann
|
||||
* @see SQLiteTest
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
public class H2Test implements DatabaseTest {
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ import org.junit.jupiter.api.BeforeAll;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import utilities.DBPreparer;
|
||||
import utilities.RandomData;
|
||||
|
@ -49,7 +47,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class MySQLTest implements DatabaseTest {
|
||||
|
||||
|
|
|
@ -28,8 +28,6 @@ import org.junit.jupiter.api.BeforeAll;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import utilities.DBPreparer;
|
||||
import utilities.OptionalAssert;
|
||||
|
@ -47,7 +45,6 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
/**
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
public class SQLiteTest implements DatabaseTest {
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@ package com.djrapitops.plan.storage.database.sql.building;
|
|||
import com.djrapitops.plan.storage.database.DBType;
|
||||
import com.djrapitops.plan.storage.database.sql.tables.ServerTable;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
|
@ -29,7 +27,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class CreateTableBuilderTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -20,8 +20,6 @@ import com.djrapitops.plan.delivery.domain.DateObj;
|
|||
import com.djrapitops.plan.utilities.analysis.Median;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
import utilities.TestConstants;
|
||||
|
||||
|
@ -38,7 +36,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class PingMedianTest {
|
||||
|
||||
private static List<DateObj<Integer>> testPing;
|
||||
|
|
|
@ -20,8 +20,6 @@ import com.djrapitops.plan.settings.Permissions;
|
|||
import com.djrapitops.plugin.command.Sender;
|
||||
import com.djrapitops.plugin.command.SenderType;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
@ -33,7 +31,6 @@ import static org.mockito.Mockito.when;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class MiscUtilsTest {
|
||||
|
||||
private Sender mockAPlayerSender(String name, boolean hasPermission) {
|
||||
|
|
|
@ -18,8 +18,6 @@ package com.djrapitops.plan.utilities;
|
|||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -31,7 +29,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
/**
|
||||
* @author Fuzzlemann
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class PassEncryptTest {
|
||||
|
||||
private static final Map<String, String> PASSWORD_MAP = new HashMap<>();
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
package com.djrapitops.plan.utilities.analysis;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -32,7 +30,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class MedianTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -28,8 +28,6 @@ import com.djrapitops.plan.settings.locale.lang.Lang;
|
|||
import com.djrapitops.plan.utilities.PassEncryptUtil;
|
||||
import com.djrapitops.plan.utilities.java.Lists;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
|
||||
import java.util.*;
|
||||
|
@ -38,7 +36,6 @@ import java.util.stream.Stream;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class ComparatorTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* This file is part of Player Analytics (Plan).
|
||||
*
|
||||
* Plan is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License v3 as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Plan is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.djrapitops.plan.utilities.java;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* Tests for Java Map shenanigans.
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class MapsSanityTest {
|
||||
|
||||
@Test
|
||||
void mapComputeIfAbsentPutSideEffect() {
|
||||
Map<String, String> t = new HashMap<>();
|
||||
t.computeIfAbsent("Test", key -> "Confirmed");
|
||||
assertEquals("Confirmed", t.get("Test"));
|
||||
}
|
||||
|
||||
}
|
|
@ -18,8 +18,6 @@ package com.djrapitops.plan.version;
|
|||
|
||||
import com.djrapitops.plugin.api.utility.Version;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
@ -27,7 +25,6 @@ import java.util.List;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
class VersionInfoLoaderTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
<property name="max" value="1750"/>
|
||||
<property name="fileExtensions" value=".java"/>
|
||||
</module>
|
||||
<module name="LineLength">
|
||||
<!-- This value is very high. Notable: ExtensionExtractor: 254, DeepHelpLang 345, WorldMap 2964 -->
|
||||
<property name="max" value="3000"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<module name="SuppressionCommentFilter">
|
||||
|
@ -28,10 +32,7 @@
|
|||
<module name="AnonInnerLength">
|
||||
<property name="max" value="50"/>
|
||||
</module>
|
||||
<module name="LineLength">
|
||||
<!-- This value is very high. Notable: ExtensionExtractor: 254, DeepHelpLang 345, WorldMap 2964 -->
|
||||
<property name="max" value="3000"/>
|
||||
</module>
|
||||
|
||||
<module name="MethodLength">
|
||||
<!-- This value is high. Notable: InspectPage: 138 -->
|
||||
<property name="max" value="150"/>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#Tue Mar 10 10:16:40 EET 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip
|
||||
#Tue Mar 10 21:27:56 EET 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.1-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -27,8 +27,6 @@ import com.djrapitops.plan.storage.database.queries.objects.ServerQueries;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
import utilities.mocks.NukkitMockComponent;
|
||||
|
||||
|
@ -44,7 +42,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class NukkitSystemTest {
|
||||
|
||||
private final int TEST_PORT_NUMBER = RandomData.randomInt(9005, 9500);
|
||||
|
|
|
@ -26,8 +26,6 @@ import com.djrapitops.plugin.logging.error.ConsoleErrorLogger;
|
|||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import utilities.TestConstants;
|
||||
|
@ -41,7 +39,6 @@ import static org.mockito.Mockito.*;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
public class NukkitAFKListenerTest {
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ public class PlanNukkitMocker extends Mocker {
|
|||
ErrorHandler consoleErrorLogger = new ConsoleErrorLogger(testPluginLogger);
|
||||
Timings timings = new Timings(debugLogger);
|
||||
|
||||
Mockito.doReturn(mockedLogger).when(planMock).getLogger();
|
||||
doReturn(mockedLogger).when(planMock).getLogger();
|
||||
doReturn(runnableFactory).when(planMock).getRunnableFactory();
|
||||
doReturn(testPluginLogger).when(planMock).getPluginLogger();
|
||||
doReturn(debugLogger).when(planMock).getDebugLogger();
|
||||
|
@ -104,7 +104,7 @@ public class PlanNukkitMocker extends Mocker {
|
|||
doReturn(25565).when(serverMock).getPort();
|
||||
doReturn("1.12.2").when(serverMock).getVersion();
|
||||
doReturn("32423").when(serverMock).getNukkitVersion();
|
||||
Mockito.doReturn(TestConstants.SERVER_MAX_PLAYERS).when(serverMock).getMaxPlayers();
|
||||
doReturn(TestConstants.SERVER_MAX_PLAYERS).when(serverMock).getMaxPlayers();
|
||||
ConsoleCommandSender sender = Mockito.mock(ConsoleCommandSender.class);
|
||||
doReturn(sender).when(serverMock).getConsoleSender();
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@ import com.djrapitops.plan.settings.config.paths.key.Setting;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
import utilities.mocks.SpongeMockComponent;
|
||||
|
||||
|
@ -40,7 +38,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class SpongeSystemTest {
|
||||
|
||||
private final int TEST_PORT_NUMBER = RandomData.randomInt(9005, 9500);
|
||||
|
|
|
@ -24,8 +24,6 @@ import com.djrapitops.plan.storage.database.SQLiteDB;
|
|||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import utilities.RandomData;
|
||||
import utilities.mocks.VelocityMockComponent;
|
||||
|
||||
|
@ -39,7 +37,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class VelocitySystemTest {
|
||||
|
||||
private final int TEST_PORT_NUMBER = RandomData.randomInt(9005, 9500);
|
||||
|
|
|
@ -21,8 +21,6 @@ import com.velocitypowered.api.proxy.Player;
|
|||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
import utilities.TestConstants;
|
||||
import utilities.mocks.PlanVelocityMocker;
|
||||
|
@ -38,7 +36,6 @@ import static org.mockito.Mockito.when;
|
|||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class VelocityPingCounterTest {
|
||||
|
||||
private PlanVelocity plugin;
|
||||
|
|
Loading…
Reference in New Issue
Block a user