public async void Create() { var mock = new ServiceMockFacade <IConfigurationRepository>(); var model = new ApiConfigurationRequestModel(); mock.RepositoryMock.Setup(x => x.Create(It.IsAny <Configuration>())).Returns(Task.FromResult(new Configuration())); var service = new ConfigurationService(mock.LoggerMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.ConfigurationModelValidatorMock.Object, mock.BOLMapperMockFactory.BOLConfigurationMapperMock, mock.DALMapperMockFactory.DALConfigurationMapperMock); CreateResponse <ApiConfigurationResponseModel> response = await service.Create(model); response.Should().NotBeNull(); mock.ModelValidatorMockFactory.ConfigurationModelValidatorMock.Verify(x => x.ValidateCreateAsync(It.IsAny <ApiConfigurationRequestModel>())); mock.RepositoryMock.Verify(x => x.Create(It.IsAny <Configuration>())); }