public async void Get_null_record() { var mock = new ServiceMockFacade <IExtensionConfigurationRepository>(); mock.RepositoryMock.Setup(x => x.Get(It.IsAny <string>())).Returns(Task.FromResult <ExtensionConfiguration>(null)); var service = new ExtensionConfigurationService(mock.LoggerMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.ExtensionConfigurationModelValidatorMock.Object, mock.BOLMapperMockFactory.BOLExtensionConfigurationMapperMock, mock.DALMapperMockFactory.DALExtensionConfigurationMapperMock); ApiExtensionConfigurationResponseModel response = await service.Get(default(string)); response.Should().BeNull(); mock.RepositoryMock.Verify(x => x.Get(It.IsAny <string>())); }
public async void TestGet() { ApiExtensionConfigurationResponseModel response = await this.Client.ExtensionConfigurationGetAsync("A"); response.Should().NotBeNull(); }