示例#1
0
        public void ShouldReturnTimeFromEndTimeCellWhenPassedARequestedEndTime()
        {
            var endTime = new DateTime(2012, 12, 20, 08, 15, 00);

            using (var report = new XlsReport(TestTimesheet))
            {
                report.WriteEndTime(endTime);
                var readTime = report.ReadEndTime(new DateTime(2012, 12, 20));
                Assert.That(readTime, Is.EqualTo(endTime));
            }
        }
示例#2
0
        public void ShouldWriteEndTimeToCorrectCellForThursday()
        {
            using (var report = new XlsReport(TestTimesheet))
            {
                var thursdayEndTime = new DateTime(2012, 12, 20, 08, 15, 00);
                report.WriteEndTime(thursdayEndTime);
            }

            var date = GetValueFromCell(TestTimesheet, "January", "D10");

            Assert.That(ConvertToDateTime(date), Is.EqualTo(new TimeSpan(8, 15, 0)));
        }