only: reducing junit4

This commit is contained in:
rusefillc 2024-02-14 10:31:00 -05:00
parent 9b95482a07
commit 80e0b83b14
3 changed files with 18 additions and 3 deletions

View File

@ -12,7 +12,7 @@ dependencies {
api project(':inifile')
api project(':enum_to_string')
api global_libs.snakeyaml
testFixturesApi global_libs.junit
testFixturesApi global_libs.junit5
}
shadowJar {

View File

@ -0,0 +1,15 @@
package com.rusefi;
import org.junit.jupiter.api.Assertions;
public class AssertCompatibility {
// FACEPALM: between junit4 and junit4 they have changed order of arguments
public static void assertNotNull(String message, Object actual) {
Assertions.assertNotNull(actual, message);
}
public static void assertEquals(Object expected, Object actual) {
Assertions.assertEquals(expected, actual);
}
}

View File

@ -5,8 +5,8 @@ import com.rusefi.util.LazyFile;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static com.rusefi.AssertCompatibility.assertEquals;
import static com.rusefi.AssertCompatibility.assertNotNull;
public class TestFileCaptor implements LazyFile.LazyFileFactory {
Map<String, StringBufferLazyFile> fileCapture = new HashMap<>();