public async void Get_null_record()
        {
            var mock = new ServiceMockFacade <IProductModelIllustrationRepository>();

            mock.RepositoryMock.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult <ProductModelIllustration>(null));
            var service = new ProductModelIllustrationService(mock.LoggerMock.Object,
                                                              mock.RepositoryMock.Object,
                                                              mock.ModelValidatorMockFactory.ProductModelIllustrationModelValidatorMock.Object,
                                                              mock.BOLMapperMockFactory.BOLProductModelIllustrationMapperMock,
                                                              mock.DALMapperMockFactory.DALProductModelIllustrationMapperMock);

            ApiProductModelIllustrationResponseModel response = await service.Get(default(int));

            response.Should().BeNull();
            mock.RepositoryMock.Verify(x => x.Get(It.IsAny <int>()));
        }
Ejemplo n.º 2
0
        public async void TestGet()
        {
            ApiProductModelIllustrationResponseModel response = await this.Client.ProductModelIllustrationGetAsync(1);

            response.Should().NotBeNull();
        }