also dead

This commit is contained in:
rusefi 2019-06-16 17:47:09 -04:00
parent da005a1bb7
commit 20e2d58950
1 changed files with 1 additions and 16 deletions

View File

@ -3,6 +3,7 @@ package com.rusefi.core.test;
import com.rusefi.core.SensorCentral;
import com.rusefi.core.EngineState;
import com.rusefi.io.LinkDecoder;
import org.junit.Ignore;
import org.junit.Test;
import java.util.concurrent.atomic.AtomicInteger;
@ -29,20 +30,4 @@ public class EngineStateTest {
assertFalse(EngineState.startWithIgnoreCase("HELLO", "hellllll"));
assertFalse(EngineState.startWithIgnoreCase("HELLO", "ha"));
}
@Test
public void testRpm() {
final AtomicInteger rpmResult = new AtomicInteger();
EngineState es = new EngineState(new EngineState.EngineStateListenerImpl() {
public void onKeyValue(String key, String value) {
if ("rpm".equals(key))
rpmResult.set(Integer.parseInt(value));
}
});
es.processNewData("line:7:", LinkDecoder.TEXT_PROTOCOL_DECODER);
es.processNewData(SensorCentral.RPM_KEY + SEPARATOR, LinkDecoder.TEXT_PROTOCOL_DECODER);
assertEquals(0, rpmResult.get());
es.processNewData("600\r", LinkDecoder.TEXT_PROTOCOL_DECODER);
assertEquals(600, rpmResult.get());
}
}