public async void Get_null_record() { var mock = new ServiceMockFacade <IDashboardConfigurationRepository>(); mock.RepositoryMock.Setup(x => x.Get(It.IsAny <string>())).Returns(Task.FromResult <DashboardConfiguration>(null)); var service = new DashboardConfigurationService(mock.LoggerMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.DashboardConfigurationModelValidatorMock.Object, mock.BOLMapperMockFactory.BOLDashboardConfigurationMapperMock, mock.DALMapperMockFactory.DALDashboardConfigurationMapperMock); ApiDashboardConfigurationResponseModel response = await service.Get(default(string)); response.Should().BeNull(); mock.RepositoryMock.Verify(x => x.Get(It.IsAny <string>())); }
public async void TestGet() { ApiDashboardConfigurationResponseModel response = await this.Client.DashboardConfigurationGetAsync("A"); response.Should().NotBeNull(); }