Exemple #1
0
        public void ShouldReturnTimeFromStartTimeCellWhenPassedARequestedStartTime()
        {
            var startTime = new DateTime(2012, 12, 20, 08, 15, 00);

            using (var report = new XlsReport(TestTimesheet))
            {
                report.WriteStartTime(startTime);
                var readTime = report.ReadStartTime(new DateTime(2012, 12, 20));
                Assert.That(readTime, Is.EqualTo(startTime));
            }
        }
Exemple #2
0
        public void ShouldWritetimeToCorrectCellForTuesdayInCoupleOfWeeks()
        {
            using (var report = new XlsReport(TestTimesheet))
            {
                var nextMondayStartTime = new DateTime(2013, 01, 01, 08, 15, 00);
                report.WriteStartTime(nextMondayStartTime);
            }

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

            Assert.That(ConvertToDateTime(date), Is.EqualTo(new TimeSpan(8, 15, 0)));
        }
Exemple #3
0
        public void ShouldWriteTimeToCorrectCellForNextFridayStartTime()
        {
            using (var report = new XlsReport(TestTimesheet))
            {
                var nextMondayStartTime = new DateTime(2012, 12, 28, 08, 15, 00);
                report.WriteStartTime(nextMondayStartTime);
            }

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

            Assert.That(ConvertToDateTime(date), Is.EqualTo(new TimeSpan(8, 15, 0)));
        }
Exemple #4
0
        public void ShouldWriteTimeToCorrectCellForMondayStartTime()
        {
            using (var report = new XlsReport(TestTimesheet))
            {
                var mondayStartTime = new DateTime(2012, 12, 17, 9, 30, 0);
                report.WriteStartTime(mondayStartTime);
            }

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

            Assert.That(ConvertToDateTime(date), Is.EqualTo(new TimeSpan(9, 30, 0)));
        }