Ejemplo n.º 1
0
 public void SendIDOnlyTest()
 {
     DataSendingNaoEvent e = new DataSendingNaoEvent(0xFF);
     e.SendAsInt();
     StartRead();
     Assert.AreEqual(1, mem.Length);
     byte val = stream.ReadByte();
     Assert.AreEqual(0xFF, val);
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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());
            }
        }