Exemplo n.º 1
0
        public static void TestHeartbeatSuccessfull()
        {
            Heartbeat heartbeat = new Heartbeat("TESTKEY", 1, true);

            System.Threading.Thread.Sleep(61 * 1000);

            Assert.AreEqual(Reporter.beats, 1);
        }
Exemplo n.º 2
0
        public static void TestHeartbeatInvalidKey()
        {
            Heartbeat heartbeat = new Heartbeat("INVALIDKEY", 1);

            System.Threading.Thread.Sleep(61 * 1000);

            Assert.AreEqual(Reporter.errors, 1);
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("hearbeats: 0");
            Console.WriteLine("exceptions: 0");
            Console.WriteLine("failed: 0");

            Heartbeat heartbeat = new Heartbeat("TEST", 1);

            while (true)
            {
                Console.SetCursorPosition(11, 0);
                Console.Write(Reporter.beats);
                Console.SetCursorPosition(12, 1);
                Console.Write(Reporter.exceptions);
                Console.SetCursorPosition(8, 2);
                Console.Write(Reporter.errors);
            }
        }