added deviceId test. and ChannelValueWrong
This commit is contained in:
parent
41452fab63
commit
3deb94652f
|
@ -13,11 +13,12 @@ import static org.junit.Assert.assertEquals;
|
|||
|
||||
public class BuntiDMXDeviceTest {
|
||||
private static final int STARTADDRESS = 42;
|
||||
private static final int DEVICEID = 23;
|
||||
BuntiDMXDevice dut;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
dut = new Par56Spot(23,STARTADDRESS,"device");
|
||||
dut = new Par56Spot(DEVICEID,STARTADDRESS,"device");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -88,6 +89,11 @@ public class BuntiDMXDeviceTest {
|
|||
assertEquals(dut.getChannelValueByName("nonexistent"),0 );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetChannelValueWrong2() throws Exception {
|
||||
assertEquals(dut.getChannelValueByName(null), 0);
|
||||
}
|
||||
|
||||
private Map<String, Object> createOptions() {
|
||||
Map<String, Object> options = new HashMap<String, Object>();
|
||||
options.put("blue", 99);
|
||||
|
@ -135,4 +141,10 @@ public class BuntiDMXDeviceTest {
|
|||
dut.setDeviceName("rapunzel");
|
||||
assertEquals("rapunzel", dut.getDeviceName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDeviceId() throws Exception {
|
||||
assertEquals(DEVICEID, dut.getDeviceId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue