public ListPrimaryEmail ( |
||
cVolEmail | ||
Результат |
public sp_Email_DM hSelectPrimaryVolEmail(sp_Email_DM givenEmail) { sp_Email_DM Email = new sp_Email_DM(); sp_VolEmail_BLL VolEmailBll = new sp_VolEmail_BLL(); Email = VolEmailBll.ListPrimaryEmail(givenEmail); return Email; }
public void TestVolEmailUpdate() { sp_VolEmail_BLL volEmailBLL = new sp_VolEmail_BLL(); volEmailBLL.InsertEmailContext(ref primaryTestVolEmail); sp_Email_DM updateEmail = volEmailBLL.ListPrimaryEmail(primaryTestVolEmail); String newEmailAddr = "*****@*****.**"; updateEmail.EmailAddr = newEmailAddr; volEmailBLL.UpdateEmailAddr(updateEmail); sp_Email_DM selectedEmail = volEmailBLL.ListPrimaryEmail(updateEmail); //To get all emails listed, create a new domain model with no emailID specified. sp_Email_DM selectAllEmails = new sp_Email_DM(); selectAllEmails.VolID = updateEmail.VolID; List<sp_Email_DM> selectedEmailList = volEmailBLL.ListEmails(selectAllEmails); Assert.IsTrue(EmailListContains(selectedEmailList, updateEmail)); Assert.IsTrue(EmailListContains(selectedEmailList, selectedEmail)); Assert.IsTrue(EmailEquals(selectedEmail,updateEmail)); Assert.AreEqual(newEmailAddr, selectedEmail.EmailAddr); }
public void TestVolEmailPrimaryRead() { sp_VolEmail_BLL volEmailBLL = new sp_VolEmail_BLL(); sp_Email_DM volEmailDM_selected = volEmailBLL.ListPrimaryEmail(primaryTestVolEmail); Assert.IsTrue(EmailEquals(primaryTestVolEmail,volEmailDM_selected)); volEmailDM_selected = volEmailBLL.ListPrimaryEmail(secondaryTestVolEmail); Assert.IsTrue(EmailEquals(primaryTestVolEmail, volEmailDM_selected)); }