mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-03 14:01:47 +01:00
Removed vintage engine (JUnit 4) dependency
This commit is contained in:
parent
5dca308e18
commit
1ef4b61319
@ -116,7 +116,6 @@ subprojects {
|
|||||||
// Test Tooling Dependencies
|
// Test Tooling Dependencies
|
||||||
testCompile "org.junit.jupiter:junit-jupiter-engine:5.5.1" // JUnit 5
|
testCompile "org.junit.jupiter:junit-jupiter-engine:5.5.1" // JUnit 5
|
||||||
testCompile "org.junit.platform:junit-platform-runner:1.5.1" // JUnit 4 runner for JUnit 5 tests
|
testCompile "org.junit.platform:junit-platform-runner:1.5.1" // JUnit 4 runner for JUnit 5 tests
|
||||||
testCompile "org.junit.vintage:junit-vintage-engine:5.5.1" // JUnit 4 compatibility for JUnit 5
|
|
||||||
testCompile "org.junit.jupiter:junit-jupiter-params:5.5.1" // JUnit 5, parameterized tests
|
testCompile "org.junit.jupiter:junit-jupiter-params:5.5.1" // JUnit 5, parameterized tests
|
||||||
testCompile "org.mockito:mockito-core:3.0.0" // Mockito Core
|
testCompile "org.mockito:mockito-core:3.0.0" // Mockito Core
|
||||||
testCompile "org.mockito:mockito-junit-jupiter:3.0.0" // Mockito JUnit 5 Extension
|
testCompile "org.mockito:mockito-junit-jupiter:3.0.0" // Mockito JUnit 5 Extension
|
||||||
|
@ -1,27 +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 rules;
|
|
||||||
|
|
||||||
import com.djrapitops.plan.PlanPlugin;
|
|
||||||
import com.djrapitops.plan.system.PlanSystem;
|
|
||||||
import org.junit.rules.TestRule;
|
|
||||||
|
|
||||||
public interface ComponentMocker extends TestRule {
|
|
||||||
PlanPlugin getPlanMock();
|
|
||||||
|
|
||||||
PlanSystem getPlanSystem();
|
|
||||||
}
|
|
@ -1,54 +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 rules;
|
|
||||||
|
|
||||||
import com.djrapitops.plan.PlanPlugin;
|
|
||||||
import com.djrapitops.plan.system.PlanSystem;
|
|
||||||
import org.junit.rules.ExternalResource;
|
|
||||||
import org.junit.rules.TemporaryFolder;
|
|
||||||
import utilities.dagger.DaggerPlanPluginComponent;
|
|
||||||
import utilities.dagger.PlanPluginComponent;
|
|
||||||
import utilities.mocks.PlanPluginMocker;
|
|
||||||
|
|
||||||
public class PluginComponentMocker extends ExternalResource implements ComponentMocker {
|
|
||||||
private final TemporaryFolder testFolder;
|
|
||||||
|
|
||||||
private PlanPlugin planMock;
|
|
||||||
private PlanPluginComponent component;
|
|
||||||
|
|
||||||
public PluginComponentMocker(TemporaryFolder testFolder) {
|
|
||||||
this.testFolder = testFolder;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void before() throws Throwable {
|
|
||||||
PlanPluginMocker mocker = PlanPluginMocker.setUp()
|
|
||||||
.withDataFolder(testFolder.newFolder())
|
|
||||||
.withResourceFetchingFromJar()
|
|
||||||
.withLogging();
|
|
||||||
planMock = mocker.getPlanMock();
|
|
||||||
component = DaggerPlanPluginComponent.builder().plan(planMock).build();
|
|
||||||
}
|
|
||||||
|
|
||||||
public PlanPlugin getPlanMock() {
|
|
||||||
return planMock;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PlanSystem getPlanSystem() {
|
|
||||||
return component.system();
|
|
||||||
}
|
|
||||||
}
|
|
@ -16,8 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package utilities;
|
package utilities;
|
||||||
|
|
||||||
import org.junit.rules.ExternalResource;
|
|
||||||
|
|
||||||
import javax.net.ssl.*;
|
import javax.net.ssl.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
@ -25,7 +23,7 @@ import java.net.URL;
|
|||||||
import java.security.KeyManagementException;
|
import java.security.KeyManagementException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
public class HTTPConnector extends ExternalResource {
|
public class HTTPConnector {
|
||||||
|
|
||||||
private static final TrustManager[] trustAllCerts = new TrustManager[]{
|
private static final TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
|
Loading…
Reference in New Issue
Block a user