only: reducing junit4

This commit is contained in:
rusefillc 2024-02-14 14:43:20 -05:00
parent 0a45e6c507
commit c071074475
12 changed files with 14 additions and 19 deletions

View File

@ -7,7 +7,7 @@ apply from: '../../java_tools/dependencies.gradle'
dependencies {
api project(':ecu_io')
implementation global_libs.junit
implementation global_libs.junit4
}
task simulatorFunctionalTestLauncherWithSimulator(type: Exec) {
@ -24,4 +24,4 @@ task simulatorFunctionalTestLauncherAssumungSimulatorWasStartedExternally(type:
description = "Run the main class with ExecTask"
workingDir = rootProject.projectDir
commandLine "java", "-classpath", sourceSets.main.runtimeClasspath.getAsPath(), "com.rusefi.SimulatorFunctionalTestLauncher"
}
}

View File

@ -17,7 +17,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
import static com.rusefi.TestHelper.assertLatch;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class TcpCommunicationIntegrationTest {
// todo: implement & test TCP connector restart!

View File

@ -7,7 +7,6 @@ import com.rusefi.ldmp.StateDictionary;
import com.rusefi.ui.livedata.SourceCodePainter;
import com.rusefi.ui.livedata.VariableValueSource;
import org.antlr.v4.runtime.tree.ParseTree;
import org.junit.Ignore;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@ -16,7 +15,7 @@ import java.net.URISyntaxException;
import static com.rusefi.livedata.LiveDataParserPanel.getParseTree;
import static com.rusefi.ui.LiveDataPane.CPP_SUFFIX;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class LiveDataConventionTest {
@Test
@ -41,12 +40,12 @@ public class LiveDataConventionTest {
String sourceCode = LiveDataParserPanel.getContent(LiveDataParserPanel.class, fileName);
assertTrue("No content " + fileName + " size=" + sourceCode.length(), sourceCode.length() > 100);
assertTrue(sourceCode.length() > 100, "No content " + fileName + " size=" + sourceCode.length());
ParseTree tree = getParseTree(sourceCode);
ParseResult parseResult = CodeWalkthrough.applyVariables(valueSource, sourceCode, SourceCodePainter.VOID, tree);
assertTrue("Broken live data constraint in " + fileName + ": " + parseResult.geBrokenConditions(), parseResult.geBrokenConditions().isEmpty());
assertTrue(parseResult.geBrokenConditions().isEmpty(), "Broken live data constraint in " + fileName + ": " + parseResult.geBrokenConditions());
}
}

View File

@ -3,7 +3,7 @@ package com.rusefi.ui;
import neoe.formatter.lua.LuaFormatter;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class LuaFormatterTest {
@Test

View File

@ -14,8 +14,8 @@ import java.net.URISyntaxException;
import static com.rusefi.livedata.LiveDataParserPanel.getContentOrNull;
import static com.rusefi.ui.LiveDataPane.CPP_SUFFIX;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@Ignore // todo: https://github.com/rusefi/rusefi/issues/4669
public class LiveDataColorTest {
@ -40,7 +40,7 @@ public class LiveDataColorTest {
private void testSpecificFile(String fileName) throws IOException {
String sourceCode = getContentOrNull(getClass(), fileName);
assertNotNull("Not found: sourceCode for " + fileName, sourceCode);
assertNotNull(sourceCode, "Not found: sourceCode for " + fileName);
ParseTree tree = LiveDataParserPanel.getParseTree(sourceCode);

View File

@ -6,7 +6,7 @@ import org.junit.jupiter.api.Test;
import java.io.*;
import java.net.URISyntaxException;
import static org.junit.Assert.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class SourceReaderTest {
@Test

View File

@ -2,7 +2,7 @@ package com.rusefi.ui.lua;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class LuaImportsTest {
@Test

View File

@ -9,7 +9,6 @@ allprojects {
plugins.withType(JavaPlugin) {
dependencies {
implementation global_libs.annotations
testImplementation global_libs.junit
testImplementation global_libs.junit5
testImplementation global_libs.junit5engine
}

View File

@ -30,7 +30,6 @@ shadowJar {
}
dependencies {
exclude(dependency(global_libs.jsr305))
exclude(dependency(global_libs.junit))
exclude(dependency(global_libs.annotations))
exclude(dependency('com.ibm.icu:icu4j:.*'))
}

View File

@ -1,6 +1,6 @@
ext {
global_libs = [
junit : "junit:junit:4.13.2",
junit4 : "junit:junit:4.13.2",
junit5 : "org.junit.jupiter:junit-jupiter-api:$junit5Version",
junit5engine : "org.junit.jupiter:junit-jupiter-engine:$junit5Version",
junit5api : "org.junit.jupiter:junit-jupiter-api:$junit5Version",

View File

@ -24,7 +24,6 @@ shadowJar {
dependencies {
exclude(dependency(global_libs.jsr305))
exclude(dependency(global_libs.junit))
exclude(dependency(global_libs.annotations))
}
}
}

View File

@ -51,7 +51,6 @@ shadowJar {
dependencies in resulting jar
*/
dependencies {
exclude(dependency(global_libs.junit))
exclude(dependency(global_libs.annotations))
exclude(dependency(ts_plugin_libs.launcher_api))
}