Exemplo n.º 1
0
        public void NormalizeTimesStripsTimeFromHoursDate()
        {
            var entry = new Domain2.Hours.Hours
            {
                Case     = new Domain2.Cases.Case(),
                Provider = new Domain2.Providers.Provider(),
                Date     = new DateTime(2017, 1, 2, 3, 4, 5)
            };
            var resolver = new ResolutionService(GetEntryList(entry), _repoMock.Object);

            resolver.NormalizeCoreData(EntryApp.Unknown);
            Assert.AreEqual(new DateTime(2017, 1, 2, 0, 0, 0), entry.Date);
        }
Exemplo n.º 2
0
        public void NormalizeTimesSetsPayableHours()
        {
            var entry = new Domain2.Hours.Hours
            {
                Case      = new Domain2.Cases.Case(),
                Provider  = new Domain2.Providers.Provider(),
                Date      = DateTime.Now,
                StartTime = new TimeSpan(6, 15, 0),
                EndTime   = new TimeSpan(9, 30, 0)
            };

            var resolver = new ResolutionService(GetEntryList(entry), _repoMock.Object);

            resolver.NormalizeCoreData(EntryApp.Unknown);

            Assert.AreEqual((decimal)3.25, entry.PayableHours);
        }