public async Task СhangeStateOfTask_WhenTaskNotExists_ThenDbUpdateConcurrencyException()
 {
     var unitOfWork = new UnitOfWork(_context);
     var newTask    = new ProjectTask {
         Id = 100, Name = "wewad"
     };
     var service = new ProjectTasksService(unitOfWork);
     await Assert.ThrowsAsync <DbUpdateConcurrencyException>(() => service.PutProjectTask(newTask));
 }
        public async Task СhangeStateOfTask_WhenTaskExists_ThenCallUpdateMethod()
        {
            var unitOfWork = A.Fake <IUnitOfWork>();
            var newTask    = A.Fake <ProjectTask>();
            var service    = new ProjectTasksService(unitOfWork);
            await service.PutProjectTask(newTask);

            A.CallTo(() => unitOfWork.ProjectTasks.UpdateAsync(newTask)).MustHaveHappened();
        }