コード例 #1
0
ファイル: TimeUnitTest.cs プロジェクト: cverhelst/Timetable
        public void IsConsecutiveWith_GapBetweenTimeUnits_ReturnFalse()
        {
            TimeUnit unit2 = new TimeUnit(end.AddMilliseconds(1), end.AddDays(1));

            Assert.IsFalse(unit2.IsConsecutiveWith(unit1));
        }
コード例 #2
0
ファイル: TimeUnitTest.cs プロジェクト: cverhelst/Timetable
        public void IsConsecutiveWith_Yes_ReturnTrue()
        {
            TimeUnit unit2 = new TimeUnit(end, end.AddDays(1));

            Assert.IsTrue(unit2.IsConsecutiveWith(unit1));
        }
コード例 #3
0
ファイル: TimeUnit.cs プロジェクト: cverhelst/Timetable
 public bool Merge(TimeUnit other)
 {
     bool result = false;
     if(other.IsConsecutiveWith(this)) {
         End = other.End;
         result = true;
     }
     return result;
 }