public void ShouldInitWithPartialList1() { var timestamps = new BlockTimestamps(); timestamps.Init(1, 100); Assert.That(timestamps.Median(), Is.EqualTo(1)); }
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))); }