Example #1
0
        public async Task MilestoneRepository_UpdateAsync_UpdateEntity()
        {
            await using var context = new TimeTrackingDbContext(_dbOptions);
            var milestoneRepository = new MilestoneRepository(context);
            var entityToUpdate      = MilestonesDbSet.Get().First();

            entityToUpdate.Description = "New description";

            var actual = await milestoneRepository.UpdateAsync(entityToUpdate);

            Assert.That(actual, Is.EqualTo(entityToUpdate).Using(EqualityComparers.MilestoneComparer));
        }