Exemplo n.º 1
0
        public void PingList_Adds_Values()
        {
            PingList pingList = new PingList();

            pingList.Add(DateTime.Now.Ticks);
            pingList.Add(DateTime.Now.Ticks);
            pingList.Add(DateTime.Now.Ticks);
            pingList.Add(DateTime.Now.Ticks);

            Assert.AreEqual(pingList.Length(), 4);
        }
Exemplo n.º 2
0
        public void PingList_ToBinary()
        {
            PingList pingList = new PingList();

            pingList.Add(DateTime.Now.Ticks);
            Thread.Sleep(1);
            pingList.Add(DateTime.Now.Ticks);
            Thread.Sleep(2);
            pingList.Add(DateTime.Now.Ticks);
            Thread.Sleep(3);
            pingList.Add(DateTime.Now.Ticks);
            Thread.Sleep(2);
            pingList.Add(DateTime.Now.Ticks);

            Thread.Sleep(10);
            Console.WriteLine(pingList.ToBinary(0));

            Assert.AreEqual(pingList.ToBinary(0), "0121");
        }
Exemplo n.º 3
0
        public void PingList_PingAt_Return_Value()
        {
            PingList pingList = new PingList();

            long check = DateTime.Now.Ticks;

            pingList.Add(check);

            Assert.AreEqual(check, pingList.PingAt(0));
        }