ListVendors() public method

public ListVendors ( ) : List
return List
Esempio n. 1
0
 public void TestContactUpdate()
 {
     DataTable dt = cExcel.ReadExcelFile("Sheet1", Path.Combine(cExcel.GetHelperFilesDir(), "Vendor.xlsx"));
     foreach (DataRow row in dt.Rows) // Loop over the rows.
     {
         string vendorID = row["VendorID"].ToString();
         string updateVendorName = "TestVendorName";;
         sp_Vendor_DM data = new sp_Vendor_DM();
         data.VendorID = new Guid(vendorID);
         data.VendorName = updateVendorName;
         sp_Vendor_BLL vendor = new sp_Vendor_BLL();
         vendor.UpdateVolunteerContext(data);
         data = vendor.ListVendors(new Guid(vendorID));
         Assert.AreEqual(updateVendorName, data.VendorName, "Vendor Name Not Set As Expected");
     }
 }
Esempio n. 2
0
 public void TestVendorRead()
 {
     DataTable dt = cExcel.ReadExcelFile("Sheet1", Path.Combine(cExcel.GetHelperFilesDir(), "Vendor.xlsx"));
     foreach (DataRow row in dt.Rows) // Loop over the rows.
     {
         string vendorID = row["VendorID"].ToString();
         sp_Vendor_BLL vendor = new sp_Vendor_BLL();
         sp_Vendor_DM data = vendor.ListVendors(new Guid(vendorID));
         Assert.AreEqual(row["VendorName"].ToString(), data.VendorName, "Vendor Name Not Set As Expected");
     }
 }
Esempio n. 3
0
        public void TestVendorReadAll()
        {
            //Pull our data from the excel file
            string helperDir = cExcel.GetHelperFilesDir();
            DataTable dt = cExcel.ReadExcelFile("Sheet1", Path.Combine(helperDir, "Vendor.xlsx"));
            //Pull our data directly from the DB
            var numRows = cExcel.getNumRecordsFromDB("[Vend].[tblVendor]");

            //Pull our data from the DB through the BLL
            sp_Vendor_BLL vendor = new sp_Vendor_BLL();
            var allVendors = vendor.ListVendors();

            //Test the data from the BLL
            Assert.AreEqual(numRows, allVendors.Count);
        }