Пример #1
0
        public void CanSaveNewTimeEntry()
        {
            var _timeEntryRepository = new TimeEntryRepository(_session);
            var savedTimeEntry       = _timeEntryRepository.SaveOrUpdate(DataGenerator.GetTimeEntry(_task, _user, _timeEntryType));

            Assert.AreNotEqual(0, savedTimeEntry.Id);
            Assert.AreNotEqual(Guid.Empty, savedTimeEntry.Guid);
        }
Пример #2
0
        public void CanUpdateExistingTimeEntry()
        {
            var _timeEntryRepository = new TimeEntryRepository(_session);
            var savedTimeEntry       = _timeEntryRepository.SaveOrUpdate(DataGenerator.GetTimeEntry(_task, _user, _timeEntryType));

            savedTimeEntry.TimeSpent = 1;
            var retrievedSavedTask = _timeEntryRepository.SaveOrUpdate(savedTimeEntry);


            Assert.AreEqual(savedTimeEntry.Guid, retrievedSavedTask.Guid);
            Assert.AreEqual(1, retrievedSavedTask.TimeSpent);
        }