Пример #1
0
        public void Processor114LCM_JunkCommand()
        {
            RequestProcessor_114LCM testProcessor = new RequestProcessor_114LCM();

            byte[] testRequestBytes = new byte[] { 0x19 };
            byte[] testResult       = testProcessor.ProcessRequestBytes(testRequestBytes);

            Assert.AreEqual(null, testResult);
            Assert.AreEqual(true, testProcessor.IsPaused());
        }
Пример #2
0
        public void Processor114LCM_EchoCallTest()
        {
            RequestProcessor_114LCM testProcessor = new RequestProcessor_114LCM();

            //normal use case
            byte[] testRequestBytes = new byte[] { 0x4B, 0x01 };
            byte[] testResult       = testProcessor.ProcessRequestBytes(testRequestBytes);

            Assert.AreEqual(testResult.Length, 2);

            Assert.AreEqual(0x01, testResult[0]);
            Assert.AreEqual(0x23, testResult[1]);

            // TODO: Verify hang behavior on real telescope - 0
            //common f**k up one
            testRequestBytes = new byte[] { 0x4B, 0x01, 0x02, 0x03 };
            testResult       = testProcessor.ProcessRequestBytes(testRequestBytes);

            Assert.AreEqual(testResult.Length, 2);

            Assert.AreEqual(0x01, testResult[0]);
            Assert.AreEqual(0x23, testResult[1]);

            Assert.AreEqual(testProcessor.IsSimulationHung(), true);
            Assert.AreEqual(testProcessor.IsHangPreReturn(), false);

            // TODO: Verify hang behavior on real telescope - 1
            //common f**k up two
            testProcessor = new RequestProcessor_114LCM();

            testRequestBytes = new byte[] { 0x4B };

            testResult = testProcessor.ProcessRequestBytes(testRequestBytes);

            Assert.AreEqual(testProcessor.IsPaused(), true);
        }