Exemple #1
0
        public void InsertEffortEntry()
        {
            //given
            pa = paDao.insert(pa);
            d  = pdDao.Insert(d);
            mbDao.InsertMonthlyBilling(mb);

            //when
            eeDao.InsertEntry(effortEntries[0]);
            eeDao.InsertEntry(effortEntries[1]);

            //then
            List <EffortEntry> ees = eeDao.GetEntries(mb.Pa.Id, mb.Pur.Purchaser.Id, mb.Month, mb.Year);

            Assert.AreEqual(ees.Count, 2);

            Assert.AreEqual(ees[0].A1.Name, Activity.State.Begleitung);
            Assert.AreEqual(ees[0].A2.Name, Activity.State.Hauswirtschaft);
            Assert.AreEqual(ees[0].Km, 10);
            Assert.AreEqual(ees[0].From.Hour, 12);
            Assert.AreEqual(ees[0].From.Minute, 30);
            Assert.AreEqual(ees[0].To.Hour, 18);
            Assert.AreEqual(ees[0].To.Minute, 45);
        }
Exemple #2
0
        public void DoEffortEntry(EffortEntry e)
        {
            EffortEntryDAO eDao = new EffortEntryDAO();

            eDao.InsertEntry(e);
        }