public void Complement(List <Interval <int> > input, List <Interval <int> > expected) { var output = Intervals.Complement(input); // Comparison is done on the string representation of intervals in order to handle infinity cases which are // not comparable. Assert.Equal(expected.Select(i => i.ToString()), output.Select(i => i.ToString())); }