public void Test2() { var merge = IntervalJoiner.Merge(new List <TaggedInterval <int> > { new TaggedInterval <int> { Value = 1, Interval = new NodaTime.Interval(InstantBuilder.Create(1, 1, 1), InstantBuilder.Create(1, 1, 15)), }, new TaggedInterval <int> { Value = 2, Interval = new NodaTime.Interval(InstantBuilder.Create(1, 1, 7), InstantBuilder.Create(1, 1, 8)), } }); }
public void Test1() { var merge = IntervalJoiner.Merge(new List <TaggedInterval <string> > { new TaggedInterval <string> { Value = "Code", Interval = new NodaTime.Interval(InstantBuilder.Create(1, 1, 1), InstantBuilder.Create(2, 1, 1)), }, new TaggedInterval <string> { Value = "Code", Interval = new NodaTime.Interval(InstantBuilder.Create(2, 1, 1), InstantBuilder.Create(3, 1, 1)), } }); merge.Single().ToString().Should().Be("Code: Code, Intervals: 0001-01-01T00:00:00Z/0003-01-01T00:00:00Z"); }