auto-sync
This commit is contained in:
parent
2487c536bb
commit
1a2b2057b1
|
@ -87,7 +87,7 @@ public class LinkManager {
|
||||||
connector.send(encodeCommand(command));
|
connector.send(encodeCommand(command));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String encodeCommand(String command) {
|
public static String encodeCommand(String command) {
|
||||||
return "sec!" + command.length() + "!" + command;
|
return "sec!" + command.length() + "!" + command;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.rusefi.io.test;
|
package com.rusefi.io.test;
|
||||||
|
|
||||||
|
import com.rusefi.io.LinkManager;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andrey Belomutskiy
|
* @author Andrey Belomutskiy
|
||||||
|
@ -9,6 +11,7 @@ import org.junit.Test;
|
||||||
public class LinkManagerTest {
|
public class LinkManagerTest {
|
||||||
@Test
|
@Test
|
||||||
public void testEncoding() {
|
public void testEncoding() {
|
||||||
|
Assert.assertEquals("sec!7!rpm 400", LinkManager.encodeCommand("rpm 400"));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue