public override void Context() { base.Context(); _productDto = new ProductDto(); QueryExecutor.Stubs(x => x.Execute<ProductDetailsQuery, ProductDto>(Arg<ProductDetailsQuery>.Matches(p => p.ProductId == ProductId))).Returns(new[] { _productDto }); _retrievedProduct = Controller.GetProduct(ProductId); }
private void StubGetProductDetailsFromControllerClient() { var productDto = new ProductDto { Id = ProductOneId, Name = ProductOneName, Description = ProductOneDescription, Price = ProductOnePrice }; ProductControllerClient.Stubs(x => x.GetProductAsync(ProductOneId)).Returns(TaskEx.FromResult(productDto)); }