Ant should go, gradle is the unified way #4371
This commit is contained in:
parent
ca43fdf454
commit
1f458f5fb3
|
@ -1,6 +1,7 @@
|
|||
ext {
|
||||
libs = [
|
||||
junit : "junit:junit:4.13",
|
||||
mockito : "org.mockito:mockito-all:1.10.19",
|
||||
annotations : "org.jetbrains:annotations:16.0.1",
|
||||
javaxJson : "javax.json:javax.json-api:1.1.4",
|
||||
snakeyaml : "org.yaml:snakeyaml:1.26",
|
||||
|
|
|
@ -20,5 +20,5 @@ dependencies {
|
|||
|
||||
// junit 4.13 does not mix well with httpclient :(
|
||||
testImplementation group: 'junit', name: 'junit', version: '4.8.2'
|
||||
testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
|
||||
testImplementation libs.mockito
|
||||
}
|
|
@ -30,5 +30,5 @@ dependencies {
|
|||
|
||||
// junit 4.13 does not mix well with httpclient :(
|
||||
testImplementation group: 'junit', name: 'junit', version: '4.8.2'
|
||||
testFixturesImplementation group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
|
||||
testFixturesImplementation libs.mockito
|
||||
}
|
|
@ -33,16 +33,13 @@ import static com.rusefi.config.generated.Fields.TS_FILE_VERSION_OFFSET;
|
|||
import static com.rusefi.io.tcp.TcpConnector.LOCALHOST;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class TestHelper {
|
||||
public class TestHelper extends MockitoTestHelper {
|
||||
private static final Logging log = getLogging(TestHelper.class);
|
||||
public static final String TEST_SIGNATURE_1 = "rusEFI 2020.07.06.frankenso_na6.2468827536";
|
||||
public static final String TEST_SIGNATURE_2 = "rusEFI 2020.07.11.proteus_f4.1986715563";
|
||||
public static final ControllerInfo CONTROLLER_INFO = new ControllerInfo("name", "make", "code", Fields.TS_SIGNATURE);
|
||||
public static final String TEST_TOKEN_1 = "00000000-1234-1234-1234-123456789012";
|
||||
public static final String TEST_TOKEN_3 = "33333333-3333-1234-1234-123456789012";
|
||||
public static final Answer<?> NEGATIVE_ANSWER = invocation -> {
|
||||
throw new UnsupportedOperationException("Not mocked " + invocation);
|
||||
};
|
||||
|
||||
@NotNull
|
||||
public static ScalarIniField createIniField(Field field) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.rusefi.ts_plugin;
|
||||
|
||||
import com.efiAnalytics.plugin.ecu.ControllerAccess;
|
||||
import com.rusefi.TestHelper;
|
||||
import com.rusefi.MockitoTestHelper;
|
||||
import com.rusefi.ui.util.FrameHelper;
|
||||
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
|
@ -10,7 +10,7 @@ import static org.mockito.Mockito.mock;
|
|||
public class LogUploadSelectorSandbox {
|
||||
public static void main(String[] args) {
|
||||
String projectName = "mre_f4";
|
||||
ControllerAccess controllerAccess = mock(ControllerAccess.class, TestHelper.NEGATIVE_ANSWER);
|
||||
ControllerAccess controllerAccess = mock(ControllerAccess.class, MockitoTestHelper.NEGATIVE_ANSWER);
|
||||
doReturn(new String[]{projectName}).when(controllerAccess).getEcuConfigurationNames();
|
||||
|
||||
new FrameHelper().showFrame(new LogUploadSelector(() -> controllerAccess).getContent());
|
||||
|
|
|
@ -11,7 +11,7 @@ import javax.swing.*;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
import static com.rusefi.TestHelper.NEGATIVE_ANSWER;
|
||||
import static com.rusefi.MockitoTestHelper.NEGATIVE_ANSWER;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
|
|
Loading…
Reference in New Issue