auto-sync

This commit is contained in:
rusEfi 2014-09-04 12:02:58 -05:00
parent 2487c536bb
commit 1a2b2057b1
2 changed files with 4 additions and 1 deletions

View File

@ -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;
}

View File

@ -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"));
}
}