Inheritance: sp_VendEmail_CON
Beispiel #1
0
 public void TestVendEmailDelete()
 {
     DataTable dt = cExcel.ReadExcelFile("Sheet1", Path.Combine(cExcel.GetHelperFilesDir(), "tblVendEmail.xlsx"));
     foreach (DataRow row in dt.Rows) // Loop over the rows.
     {
         int EmailID = Convert.ToInt32(row["EmailID"].ToString());
         sp_VendEmail_DM data = new sp_VendEmail_DM();
         sp_VendEmail_BLL vend = new sp_VendEmail_BLL();
         data.EmailID = EmailID;
         vend.DeleteEmailContext(data);
         data = vend.ListEmails(EmailID);
         Assert.AreEqual(false, data.ActiveFlg, "ActiveFlag not set as expected");
     }
 }
Beispiel #2
0
        public void TestVendEmailRead()
        {
            //Test Our Read
            DataTable dt = cExcel.ReadExcelFile("Sheet1", Path.Combine(cExcel.GetHelperFilesDir(), "tblVendEmail.xlsx"));
            foreach (DataRow row in dt.Rows) // Loop over the rows.
            {
                int EmailID = Convert.ToInt32(row["EmailID"].ToString());
                sp_VendEmail_BLL vend = new sp_VendEmail_BLL();
                sp_VendEmail_DM data = vend.ListEmails(EmailID);
                Assert.AreEqual(row["EmailAddr"].ToString(), data.EmailAddr, "EmailAddr Not Set As Expected");

            }
        }
Beispiel #3
0
        public void TestVendEmailInsert()
        {
            //Test Our Read
            sp_VendEmail_DM data = new sp_VendEmail_DM();
            string EmailAddr = "*****@*****.**";

            data.EmailAddr = EmailAddr;
            data.ActiveFlg = true;
            sp_VendEmail_BLL vend = new sp_VendEmail_BLL();
            vend.InsertEmailContext(data);
            Assert.AreEqual(EmailAddr, data.EmailAddr, "EmailAddr Not Set As Expected");
        }