public void CalculateDuration_OneAndAHalfDays_TwoDayDuration() { var visit = new LongVisit( new DateTime(2021, 3, 14, 0, 0, 0), new DateTime(2021, 3, 15, 12, 0, 0)); Assert.AreEqual(visit.CalculateDuration(), 2); }
public void CalculateDuration_Tests_( int startYear, int startMonth, int startDay, int startHour, int startMinute, int startSecond, int endYear, int endMonth, int endDay, int endHour, int endMinute, int endSecond) { var visit = new LongVisit(new DateTime(startYear, startMonth, startDay, startHour, startMinute, startSecond), new DateTime(endYear, endMonth, endDay, endHour, endMinute, endSecond)); Assert.AreEqual(visit.CalculateDuration(), 0); }