Exemplo n.º 1
0
        public void IsConsecutiveWith_GapBetweenTimeUnits_ReturnFalse()
        {
            TimeUnit unit2 = new TimeUnit(end.AddMilliseconds(1), end.AddDays(1));

            Assert.IsFalse(unit2.IsConsecutiveWith(unit1));
        }
Exemplo n.º 2
0
        public void IsConsecutiveWith_Yes_ReturnTrue()
        {
            TimeUnit unit2 = new TimeUnit(end, end.AddDays(1));

            Assert.IsTrue(unit2.IsConsecutiveWith(unit1));
        }
Exemplo n.º 3
0
 public bool Merge(TimeUnit other)
 {
     bool result = false;
     if(other.IsConsecutiveWith(this)) {
         End = other.End;
         result = true;
     }
     return result;
 }