public async void Get_null_record() { var mock = new ServiceMockFacade <ISaleTicketsRepository>(); mock.RepositoryMock.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult <SaleTickets>(null)); var service = new SaleTicketsService(mock.LoggerMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.SaleTicketsModelValidatorMock.Object, mock.BOLMapperMockFactory.BOLSaleTicketsMapperMock, mock.DALMapperMockFactory.DALSaleTicketsMapperMock); ApiSaleTicketsResponseModel response = await service.Get(default(int)); response.Should().BeNull(); mock.RepositoryMock.Verify(x => x.Get(It.IsAny <int>())); }
public async void TestGet() { ApiSaleTicketsResponseModel response = await this.Client.SaleTicketsGetAsync(1); response.Should().NotBeNull(); }