public async void Delete() { var mock = new ServiceMockFacade <IDeploymentRepository>(); var model = new ApiDeploymentRequestModel(); mock.RepositoryMock.Setup(x => x.Delete(It.IsAny <string>())).Returns(Task.CompletedTask); var service = new DeploymentService(mock.LoggerMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.DeploymentModelValidatorMock.Object, mock.BOLMapperMockFactory.BOLDeploymentMapperMock, mock.DALMapperMockFactory.DALDeploymentMapperMock, mock.BOLMapperMockFactory.BOLDeploymentRelatedMachineMapperMock, mock.DALMapperMockFactory.DALDeploymentRelatedMachineMapperMock); ActionResponse response = await service.Delete(default(string)); response.Should().NotBeNull(); mock.RepositoryMock.Verify(x => x.Delete(It.IsAny <string>())); mock.ModelValidatorMockFactory.DeploymentModelValidatorMock.Verify(x => x.ValidateDeleteAsync(It.IsAny <string>())); }