Ejemplo n.º 1
0
        public void DeviceSendsLocationLoginMessage_LocationIsParsed()
        {
            ProtocolTester.SendStringFromDevice(
                "*040331141830UB05CW0800C12345678013255A2240.8419N11408.8178E000.104033129.2011111111L000023^");

            Assert.AreEqual("*040331141830DX061^", ProtocolTester.ReceiveStringInDevice());
        }
Ejemplo n.º 2
0
        public void DeviceSendsLoginV1_ServerRespondsWithLoginConfirmation()
        {
            ProtocolTester.SendStringFromDevice(
                "(080524101241BP05000013632782450080524A2232.9806N11404.9355E000.1101241323.8700000000L000450AC)");

            Assert.AreEqual("(080524101241AP05)", ProtocolTester.ReceiveStringInDevice());
        }
Ejemplo n.º 3
0
        public void DeviceSendsLocationV4_LocationIsParsed()
        {
            ProtocolTester.SendStringFromDevice(
                "$AVRMC,99999999,164339,r,4351.0542,N,07923.5445,W,0.29,78.66,180703,0,3.727,17,1,0,0*04\r\n");

            Assert.IsNotNull(ProtocolTester.LastParsedLocation);
            Assert.AreEqual("$EAVACK,0,04*2F\r\n", ProtocolTester.ReceiveStringInDevice());
        }
Ejemplo n.º 4
0
        public void DeviceSendsLogin_AcknowledgeIsSentBack()
        {
            ProtocolTester.SendStringFromDevice(
                "$AVSYS,99999999,V1.50,SN0000103,32768*15\r\n");
            ProtocolTester.SendStringFromDevice(
                "$ECHK,99999999,0*35\r\n");

            Assert.AreEqual("$ECHK,99999999,0*35\r\n", ProtocolTester.ReceiveStringInDevice());
        }
Ejemplo n.º 5
0
        public void DeviceSendsLoginV2_ServerRespondsWithLoginConfirmation()
        {
            ProtocolTester.SendStringFromDevice("(040331141830BP00000013612345678HSO)");

            Assert.AreEqual("(040331141830AP01HSO)", ProtocolTester.ReceiveStringInDevice());
        }
Ejemplo n.º 6
0
        public void DeviceSendsIMEI_ServerRepliesWithAcknowledge()
        {
            ProtocolTester.SendStringFromDevice("##,imei:359586015829802,A;");

            Assert.AreEqual("LOAD", ProtocolTester.ReceiveStringInDevice());
        }
Ejemplo n.º 7
0
        public void DeviceSendsHeartbeat_ServerRepliesWithAcknowledge()
        {
            ProtocolTester.SendStringFromDevice("359586015829802");

            Assert.AreEqual("ON", ProtocolTester.ReceiveStringInDevice());
        }