public void CheckBasicComms()
        {
            TDKService tdkService = NewTDKService();

            tdkService.SendMessageGetResponse("ADR 05");
            Assert.AreEqual("OK", tdkService.SendMessageGetResponse("RMT LOC"));
            Assert.AreEqual("LOC", tdkService.SendMessageGetResponse("RMT?"));
        }
        public void CheckTDKNotAvailable()
        {
            // Shutdown the simulator
            RunAfterAnyTests();

            TDKService tdkService = NewTDKService();

            tdkService.SendMessageGetResponse("ADR 05");
            Assert.AreEqual("ERROR", tdkService.SendMessageGetResponse("RMT LOC"));

            // Startup the simulator
            RunBeforeAnyTests();
        }
        public void CheckNetworkError()
        {
            TDKService tdkService = NewTDKService();

            // First test
            tdkService.Connect(null, 0);
            if (!tdkService.SendMessageGetResponse("RMT LOC").Equals("ERROR"))
            {
                Assert.Fail("Network should have thrown an exception as there is no IP set");
            }

            // Reset for the second test
            tdkService.Connect(ChargerIpAddress, ChargerIpPort);
            if (tdkService.SendMessageGetResponse("RMT LOC").Equals("ERROR"))
            {
                Assert.Fail("Network should not have thown an exception, looks like IP is not set");
            }

            tdkService.Disconnect();
        }
        public void CheckNetworkError()
        {
            TDKService tdkService = NewTDKService();

            try
            {
                tdkService.Connect(null, 0);
                tdkService.SendMessageGetResponse("RMT LOC");
            } catch
            {
                Assert.IsTrue(true, "Network should have thrown an exception");
            }

            tdkService.Connect(ChargerIpAddress, ChargerIpPort);

            try
            {
                tdkService.SendMessageGetResponse("RMT LOC");
            }
            catch
            {
                Assert.Fail("Network should not have thown an exception, look like IP is not set");
            }
        }