public void OverlapsWith_Partly_Yes() { TimeUnit unit2 = new TimeUnit(start.AddMinutes(1), end.AddMinutes(1)); Assert.IsTrue(unit2.OverlapsWith(unit1)); Assert.IsTrue(unit1.OverlapsWith(unit2)); }
public void OverlapsWith_ConsecutiveUnits_No() { TimeUnit unit2 = new TimeUnit(end, end.AddDays(1)); Assert.IsFalse(unit2.OverlapsWith(unit1)); Assert.IsFalse(unit1.OverlapsWith(unit2)); }
public void OverlapsWith_GapBetweenUnits_No() { TimeUnit unit2 = new TimeUnit(end.AddHours(1), end.AddDays(1)); Assert.IsFalse(unit2.OverlapsWith(unit1)); Assert.IsFalse(unit1.OverlapsWith(unit2)); }
public void OverlapsWith_Completely_Yes() { TimeUnit unit2 = new TimeUnit(start, end); Assert.IsTrue(unit1.OverlapsWith(unit2)); Assert.IsTrue(unit2.OverlapsWith(unit1)); }