コード例 #1
0
        public void valid_searchall_products()
        {
            repository
            .Setup(rp => rp.Search())
            .Returns(Enumerable.Empty <Product>())
            .Verifiable();

            var products = searchAllManager.Search();

            products
            .Should()
            .NotBeNull();

            repository.Verify();
        }
コード例 #2
0
        public IActionResult Get()
        {
            var products = searchAllManager.Search();

            return(Ok(products));
        }