コード例 #1
0
        public void Test_Get_All()
        {
            var result = _supplierController.GetList() as OkObjectResult;

            Assert.True(result != null);
            Assert.True(result.Value != null);

            var model = result.Value as List <Customer>;

            Assert.True(model.Count > 0);
        }
コード例 #2
0
        public void GetListTest_1()
        {
            _controller.Request.Method = HttpMethod.Get;
            var actual = _controller.GetList(new SupplierFilter
            {
                Page     = 1,
                PageSize = 10
            }, 0) as OkNegotiatedContentResult <PagerInfo <SupplierDto> >;

            Assert.IsNotNull(actual);
        }