public async void AddAsync_TaskAdded() { var task = _fixture.Create <TaskDomain>(); _repository.Setup(x => x.AddAsync(task)).Returns(Task.FromResult(false)).Verifiable(); _unitOfWork.Setup(x => x.SaveChangesAsync()).Returns(Task.FromResult(false)).Verifiable(); await _taskService.AddAsync(task); _repository.VerifyAll(); _unitOfWork.VerifyAll(); }
public Task <IHttpActionResult> CreateAsync(UZTaskCreationDto dto) { return(OkOrBadRequest(TaskService.AddAsync(Mapper.Map <UZTaskCreationDto, UZTask>(dto)))); }