public void IsConsecutiveWith_GapBetweenTimeUnits_ReturnFalse() { TimeUnit unit2 = new TimeUnit(end.AddMilliseconds(1), end.AddDays(1)); Assert.IsFalse(unit2.IsConsecutiveWith(unit1)); }
public void IsConsecutiveWith_Yes_ReturnTrue() { TimeUnit unit2 = new TimeUnit(end, end.AddDays(1)); Assert.IsTrue(unit2.IsConsecutiveWith(unit1)); }
public bool Merge(TimeUnit other) { bool result = false; if(other.IsConsecutiveWith(this)) { End = other.End; result = true; } return result; }