From 3569f7df740ce45d330a79c36466b8e75e2c2895 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 4 Sep 2014 12:02:58 -0500 Subject: [PATCH] auto-sync --- java_console/io/src/com/rusefi/io/LinkManager.java | 2 +- java_console/io/src/com/rusefi/io/test/LinkManagerTest.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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")); } }