public void date_enumeration() { var dt1 = new DateTime(2015, 2, 1); var dt2 = new DateTime(2015, 3, 1); var all = dt1.EnumerateTo(dt2).ToArray(); all[0].Should().Be(dt1); all[all.Length - 1].Should().Be(dt2); all.ForEach(d=>Console.WriteLine(d)); var inverted = dt2.EnumerateTo(dt1).ToArray(); inverted[0].Should().Be(dt2); inverted[all.Length - 1].Should().Be(dt1); }
public void date_enumeration() { var dt1 = new DateTime(2015, 2, 1); var dt2 = new DateTime(2015, 3, 1); var all = dt1.EnumerateTo(dt2).ToArray(); all[0].Should().Be(dt1); all[all.Length - 1].Should().Be(dt2); all.ForEach(d=>this.LogDebug(d.ToString())); var inverted = dt2.EnumerateTo(dt1).ToArray(); inverted[0].Should().Be(dt2); inverted[all.Length - 1].Should().Be(dt1); }