public InsertPhoneContext ( |
||
_cPhone | ||
Результат | void |
public static void InsertVolPhoneData(TestContext testContext) { System.Diagnostics.Debug.WriteLine(String.Format("{0}", DateTime.Now)); cExcel.RemoveAllData(); cExcel.InsertData(ExcelFilenames); sp_Volunteer_BLL volBLL = new sp_Volunteer_BLL(); generalTestVol = new sp_Volunteer_DM(); generalTestVol.VolFirstName = "TestFirst"; generalTestVol.VolMiddleName = "TestMiddle"; generalTestVol.VolLastName = "TestLast"; generalTestVol.ActiveFlg = true; System.Guid volID = Guid.NewGuid(); generalTestVol.VolID = volID; volBLL.InsertVolunteerContext(ref generalTestVol); sp_VolPhone_BLL volPhone_bll = new sp_VolPhone_BLL(); primaryTestVolPhone = new sp_Phone_DM(); primaryTestVolPhone.PhoneNbr = "1357924680"; primaryTestVolPhone.VolID = volID; primaryTestVolPhone.ActiveFlg = true; primaryTestVolPhone.PrimaryFlg = true; volPhone_bll.InsertPhoneContext(primaryTestVolPhone); secondaryTestVolPhone = new sp_Phone_DM(); secondaryTestVolPhone.PhoneNbr = "2468013579"; secondaryTestVolPhone.VolID = volID; secondaryTestVolPhone.ActiveFlg = true; secondaryTestVolPhone.PrimaryFlg = false; volPhone_bll.InsertPhoneContext(secondaryTestVolPhone); }
public sp_Phone_DM hCreateVolPhone(string PhoneNbr,Guid VolID,bool primaryPhone,ref int numberPhones) { sp_Phone_DM Phone = new sp_Phone_DM(); sp_VolPhone_BLL VolPhoneBll = new sp_VolPhone_BLL(); numberPhones = numberPhones + 1; Phone.PhoneID = numberPhones; Phone.ActiveFlg = true; Phone.PhoneNbr = PhoneNbr; Phone.VolID = VolID; Phone.PrimaryFlg = primaryPhone; VolPhoneBll.InsertPhoneContext(Phone); return Phone; }
public void TestVolPhoneCreate() { sp_Volunteer_BLL vol_bll = new sp_Volunteer_BLL(); sp_Volunteer_DM vol_dm = new sp_Volunteer_DM(); vol_dm.VolFirstName = "createFirst"; vol_dm.VolMiddleName = "createMiddle"; vol_dm.VolLastName = "createLast"; vol_dm.ActiveFlg = true; System.Guid volID = vol_bll.InsertVolunteerContext(ref vol_dm).VolID; vol_dm.VolID = volID; string volPhoneNbr = "0123456789"; bool PrimaryFlg = true; bool ActiveFlg = true; sp_VolPhone_BLL volPhone_bll = new sp_VolPhone_BLL(); sp_Phone_DM volPhone_dm = new sp_Phone_DM(); volPhone_dm.PhoneNbr = volPhoneNbr; volPhone_dm.VolID = volID; volPhone_dm.ActiveFlg = ActiveFlg; volPhone_dm.PrimaryFlg = PrimaryFlg; volPhone_bll.InsertPhoneContext(volPhone_dm); int volPhoneID = volPhone_dm.PhoneID; List<sp_Phone_DM> volPhoneDMs_selected = volPhone_bll.ListPhones(volPhone_dm); Assert.IsTrue(PhoneListContains(volPhoneDMs_selected, volPhone_dm)); }