Ejemplo n.º 1
0
        public void ShouldInitWithPartialList1()
        {
            var timestamps = new BlockTimestamps();

            timestamps.Init(1, 100);
            Assert.That(timestamps.Median(), Is.EqualTo(1));
        }
Ejemplo n.º 2
0
        public void ShouldInitWithList()
        {
            var timestamps = new BlockTimestamps();
            var list       = new List <long>();

            for (long i = 0; i < 11; i++)
            {
                list.Add(i);
            }

            timestamps.Init(list.ToArray());

            Assert.That(timestamps.Median(), Is.EqualTo(list.ElementAt(5)));
        }