public void TestVendAddressUpdate() { //Test Our Read DataTable dt = cExcel.ReadExcelFile("Sheet1", Path.Combine(cExcel.GetHelperFilesDir(), "VendAddress.xlsx")); foreach (DataRow row in dt.Rows) // Loop over the rows. { string AddrLine1 = "TestAddrLine1"; string AddrLine2 = "TestAddrLine2"; string AddrLine3 = "TestAddrLine3"; string City = "TestCity"; string St = "TestSt"; int Zip = 11111; int Zip4 = 1111; int AddrID = Convert.ToInt32(row["AddrID"].ToString()); sp_VendAddress_DM data = new sp_VendAddress_DM(); data.AddrID = AddrID; data.AddrLine1 = AddrLine1; data.AddrLine2 = AddrLine2; data.AddrLine3 = AddrLine3; data.City = City; data.St = St; data.Zip = Zip; data.Zip4 = Zip4; sp_VendAddress_BLL vend = new sp_VendAddress_BLL(); vend.UpdateAddressContext(data); data = vend.ListAddresses(AddrID); Assert.AreEqual(AddrLine1, data.AddrLine1, "AddrLine1 Not Set As Expected"); Assert.AreEqual(AddrLine2, data.AddrLine2, "AddrLine2 Not Set As Expected"); Assert.AreEqual(AddrLine3, data.AddrLine3, "AddrLine3 Not Set As Expected"); Assert.AreEqual(City, data.City, "City Not Set As Expected"); Assert.AreEqual(St, data.St, "St Not Set As Expected"); Assert.AreEqual(Zip, data.Zip, "Zip Not Set As Expected"); Assert.AreEqual(Zip4, data.Zip4, "Zip4 Not Set As Expected"); } }