10 changed files with 101 additions and 1 deletions
@ -0,0 +1,29 @@
|
||||
package org.leolo.nrdatad; |
||||
|
||||
import org.junit.Test; |
||||
import org.leolo.nrdatad.model.SmartEvent; |
||||
import org.leolo.nrdatad.model.SmartStepType; |
||||
|
||||
import static org.junit.Assert.*; |
||||
|
||||
public class SmartEnumTest { |
||||
|
||||
@Test |
||||
public void testSmartStepType(){ |
||||
assertEquals(SmartStepType.BETWEEN, SmartStepType.parseCode("B")); |
||||
assertEquals(SmartStepType.BETWEEN, SmartStepType.parseCode("b")); |
||||
assertNull(SmartStepType.parseCode("Q")); |
||||
assertNull(SmartStepType.parseCode("X")); |
||||
assertNull(SmartStepType.parseCode("")); |
||||
} |
||||
|
||||
@Test |
||||
public void testSmartEvent(){ |
||||
assertEquals(SmartEvent.ARRIVE_UP, SmartEvent.parseCode("A")); |
||||
assertEquals(SmartEvent.ARRIVE_UP, SmartEvent.parseCode("a")); |
||||
assertNull(SmartEvent.parseCode("Q")); |
||||
assertNull(SmartEvent.parseCode("X")); |
||||
assertNull(SmartEvent.parseCode("")); |
||||
|
||||
} |
||||
} |
||||
Loading…
Reference in new issue