public string GetGrid(int userId, string session, int currPage, int NumberRowOfPage, string funcPara) { StringBuilder ret = new StringBuilder(); string result = ""; string InputValue = CXmlPara.CreatePara(new CPara[] { new CPara("PageIndex", currPage.ToString()), new CPara("RowsPerPage", NumberRowOfPage.ToString()), }, funcPara ); COutputValue outputValue = new COutputValue(); CVendor[] list = service.GetVendorList(InputValue, ref outputValue); result = CGrid.ToJsonForHandle <CVendor>(userId, 7, list, currPage, outputValue.TotalPage, outputValue.TotalRow); return(result); }
public void GetAll_Returns_VendorList_When_All_Valid() { // Arrange List <Vendor> list = new List <Vendor>(); mockRepository.Setup(m => m.GetVendorList()).Returns(list); // Act list = service.GetVendorList(); // Asserts Assert.NotNull(list); }