Exemplo n.º 1
0
        public void onTelegramReceived9Test()
        {
            SerialPortMock serialPort = new SerialPortMock();
            NuvoTelegram   target     = new NuvoTelegram(serialPort);

            serialPort.passDataToTestClass("...\r.......COMAND\r.");
            serialPort.passDataToTestClass("...\r.......COMAND\r.");
            // not supported anymore; quick-fix, uncomment unit test ->  Assert.IsTrue(target._currentTelegramBuffer.Length == 0);
        }
Exemplo n.º 2
0
        public void onTelegramReceived6Test()
        {
            SerialPortMock serialPort = new SerialPortMock();
            NuvoTelegram   target     = new NuvoTelegram(serialPort);

            target.Open(new SerialPortConnectInformation("COM1"));

            serialPort.passDataToTestClass("...#\r...");
            // not supported anymore; quick-fix, uncomment unit test ->  Assert.IsTrue(target._currentTelegramBuffer.Length == 3);   // telegram buffer contains 3 charachters
        }