only:junit5

This commit is contained in:
rusefillc 2023-12-15 11:37:24 -05:00
parent 436ce3f932
commit 77f932e1af
16 changed files with 36 additions and 34 deletions

View File

@ -1,9 +1,9 @@
package com.opensr5.ini.test;
import com.opensr5.ini.field.EnumIniField;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.*;
public class IniEnumDecoderTest {
@Test

View File

@ -5,12 +5,12 @@ import com.opensr5.ini.field.ArrayIniField;
import com.opensr5.ini.field.EnumIniField;
import com.opensr5.ini.field.IniField;
import org.jetbrains.annotations.NotNull;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import java.io.ByteArrayInputStream;
import java.util.Arrays;
import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.*;
/**
* Andrey Belomutskiy, (c) 2013-2020

View File

@ -1,6 +1,6 @@
package com.rusefi.core.io;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;

View File

@ -8,7 +8,8 @@ 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.Test;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.URISyntaxException;
@ -19,7 +20,7 @@ import static org.junit.Assert.assertTrue;
public class LiveDataConventionTest {
@Test
@Ignore
@Disabled
public void assertLiveDataConvention() throws IOException, URISyntaxException {
for (live_data_e view : live_data_e.values()) {
String fileName = StateDictionary.INSTANCE.getFileName(view) + CPP_SUFFIX;

View File

@ -19,8 +19,8 @@ import com.rusefi.proxy.client.UpdateType;
import com.rusefi.server.*;
import com.rusefi.tools.online.HttpUtil;
import org.apache.http.HttpResponse;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import java.io.IOException;
import java.net.MalformedURLException;
@ -36,7 +36,7 @@ import static org.junit.Assert.assertTrue;
public class FullServerTest {
private static final Logging log = getLogging(FullServerTest.class);
@Before
@BeforeEach
public void setup() throws MalformedURLException {
BackendTestHelper.commonServerTest();
}

View File

@ -14,8 +14,8 @@ import com.rusefi.server.*;
import com.rusefi.tools.online.HttpUtil;
import com.rusefi.tools.online.ProxyClient;
import com.rusefi.tools.online.PublicSession;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.MalformedURLException;
@ -33,7 +33,7 @@ import static org.junit.Assert.assertEquals;
* https://github.com/rusefi/web_backend/blob/master/documentation/rusEFI%20remote.png
*/
public class ServerTest {
@Before
@BeforeEach
public void setup() throws MalformedURLException {
BackendTestHelper.commonServerTest();
}

View File

@ -10,8 +10,8 @@ import com.rusefi.io.tcp.BinaryProtocolServer;
import com.rusefi.io.tcp.TcpConnector;
import com.rusefi.server.Backend;
import com.rusefi.server.ControllerConnectionState;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.net.MalformedURLException;
import java.util.concurrent.CountDownLatch;
@ -23,7 +23,7 @@ import static com.rusefi.binaryprotocol.BinaryProtocol.sleep;
public class NetworkConnectorTest {
private static final Logging log = getLogging(NetworkConnectorTest.class);
@Before
@BeforeEach
public void setup() throws MalformedURLException {
BackendTestHelper.commonServerTest();
}

View File

@ -15,8 +15,8 @@ import com.rusefi.server.SessionDetails;
import com.rusefi.tools.online.ProxyClient;
import com.rusefi.ui.StatusConsumer;
import org.jetbrains.annotations.NotNull;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.MalformedURLException;
@ -25,7 +25,6 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import static com.rusefi.BackendTestHelper.createTestUserResolver;
import static com.rusefi.TestHelper.*;
import static com.rusefi.Timeouts.SECOND;
import static com.rusefi.binaryprotocol.BinaryProtocol.findCommand;
@ -34,12 +33,12 @@ import static com.rusefi.config.generated.Fields.TS_PROTOCOL;
import static com.rusefi.io.tcp.BinaryProtocolServer.getPacketLength;
import static com.rusefi.io.tcp.TcpConnector.LOCALHOST;
import static com.rusefi.core.FileUtil.close;
import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.*;
public class LocalApplicationProxyTest {
private static final AtomicInteger portNumber = new AtomicInteger(4000);
@Before
@BeforeEach
public void setup() throws MalformedURLException {
BackendTestHelper.commonServerTest();
}

View File

@ -1,6 +1,6 @@
package com.rusefi.server;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static com.rusefi.Timeouts.MINUTE;
import static com.rusefi.Timeouts.SECOND;

View File

@ -3,7 +3,7 @@ package com.rusefi.server;
import com.rusefi.TestHelper;
import com.rusefi.proxy.NetworkConnector;
import com.rusefi.core.rusEFIVersion;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;

View File

@ -1,8 +1,8 @@
package com.rusefi.server;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.*;
public class TwoKindSemaphoreTest {
@Test

View File

@ -1,7 +1,7 @@
package com.rusefi;
import com.rusefi.core.SignatureHelper;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;

View File

@ -1,6 +1,6 @@
package com.rusefi.ts_plugin;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;

View File

@ -7,10 +7,10 @@ import com.rusefi.tools.tune.TuneTools;
import com.rusefi.tune.xml.Msq;
import com.rusefi.tune.xml.Page;
import org.junit.Assert;
import org.junit.Test;
import org.junit.function.ThrowingRunnable;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.*;
public class LoadOlderTuneTest {
@Test
@ -127,11 +127,13 @@ public class LoadOlderTuneTest {
" // defa", sb.substring(0, 3500));
}
@Test(expected = IllegalStateException.class)
@Test
public void testLegacyCustomEnumOrdinal() {
assertThrows(IllegalStateException.class, () -> {
String tsCustomLine = "bits, U08, @OFFSET@, [0:1], \"Single Coil\", \"Individual Coils\", \"Wasted Spark\", \"Two Distributors\"";
Assert.assertEquals(0, TuneTools.resolveEnumByName(tsCustomLine, "One coil"));
});
}
@Test

View File

@ -2,7 +2,7 @@ package com.rusefi.tune;
import com.opensr5.ini.IniFileModel;
import com.rusefi.tools.tune.WriteSimulatorConfiguration;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertNotNull;

View File

@ -12,13 +12,13 @@ import com.rusefi.tools.tune.TuneCanTool;
import com.rusefi.tune.xml.Constant;
import com.rusefi.tune.xml.Msq;
import org.junit.Assert;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.*;
public class TuneReadWriteTest {
private static final String PATH = TuneCanTool.SRC_TEST_RESOURCES + "frankenso/";
@ -200,7 +200,7 @@ public class TuneReadWriteTest {
* Looks like I am not getting something right around Field#FIELD_PRECISION
* See also TuneWriterTest :(
*/
assertEquals("Binary match expected", 66, compareImages(binaryDataFromXml, fileBinaryData, model));
assertEquals(66, compareImages(binaryDataFromXml, fileBinaryData, model), "Binary match expected");
// todo: looks like this is not removing the temporary file?
Files.delete(path);
}