public void SendIDOnlyTest() { DataSendingNaoEvent e = new DataSendingNaoEvent(0xFF); e.SendAsInt(); StartRead(); Assert.AreEqual(1, mem.Length); byte val = stream.ReadByte(); Assert.AreEqual(0xFF, val); }
public void SendOneParamIntTest() { DataSendingNaoEvent e = new DataSendingNaoEvent(0xFF, 1); e.SendAsInt(); StartRead(); byte val = stream.ReadByte(); Assert.AreEqual(0xFF, val); int intVal = stream.ReadInt(); Assert.AreEqual(1, intVal); }
public void SendMultipleParamsIntTest() { DataSendingNaoEvent e = new DataSendingNaoEvent(0xFF, 0, 1, 2, 3, 4); e.SendAsInt(); StartRead(); byte val = stream.ReadByte(); Assert.AreEqual(0xFF, val); for (int i = 0; i <= 4;i++ ) { Assert.AreEqual(i, stream.ReadInt()); } }