private static void CheckUnion <TValue>(Range <TValue> range1, Range <TValue> range2, string representation) where TValue : IComparable <TValue> { Assert.AreEqual(range1.Union(range2).DisplayValue(), representation); Assert.AreEqual(range2.Union(range1).DisplayValue(), representation); }