public async Task PartService_Should_Delete_Part_Async() { // Arrange SetUpUnitOfWork(); var service = new PartService(_unitOfWork.Object, _mapper); var entity = new PartDTO() { Name = "TestName", Code = "12345" }; entity = await service.CreateAsync(entity); await _unitOfWork.Object.SaveAsync(); // Act await service.DeleteAsync(entity.Id); await _unitOfWork.Object.SaveAsync(); // Assert Assert.Null(await service.GetAsync(entity.Id)); }