diff --git a/java_console/io/src/com/rusefi/io/LinkManager.java b/java_console/io/src/com/rusefi/io/LinkManager.java index 4644376cd9..de96a3a07d 100644 --- a/java_console/io/src/com/rusefi/io/LinkManager.java +++ b/java_console/io/src/com/rusefi/io/LinkManager.java @@ -87,7 +87,7 @@ public class LinkManager { connector.send(encodeCommand(command)); } - private static String encodeCommand(String command) { + public static String encodeCommand(String command) { return "sec!" + command.length() + "!" + command; } diff --git a/java_console/io/src/com/rusefi/io/test/LinkManagerTest.java b/java_console/io/src/com/rusefi/io/test/LinkManagerTest.java index 6f802e40a7..38f249dd28 100644 --- a/java_console/io/src/com/rusefi/io/test/LinkManagerTest.java +++ b/java_console/io/src/com/rusefi/io/test/LinkManagerTest.java @@ -1,6 +1,8 @@ package com.rusefi.io.test; +import com.rusefi.io.LinkManager; import org.junit.Test; +import junit.framework.Assert; /** * @author Andrey Belomutskiy @@ -9,6 +11,7 @@ import org.junit.Test; public class LinkManagerTest { @Test public void testEncoding() { + Assert.assertEquals("sec!7!rpm 400", LinkManager.encodeCommand("rpm 400")); } }