public virtual void UpdateDefaultRegisterBranchByClientUser() { var branchdto = BankBranchService.GetById(4); branchdto.Name = "fCollege road"; branchdto.CAId = 5; // default CAId=null selected branchid branchdto.SWIFTCode = "FC1234"; branchdto.CreatedBy = 1; branchdto.ModifiedBy = 1; branchdto.WeeklyHalfDay.IsThursday = true; branchdto.WeeklyHalfDay.IsSaturday = false; this.BankBranchInstance = this.BankBranchService.Update(branchdto, CurrentUserInstance.UserName); Assert.IsTrue(this.BankBranchInstance.Name == branchdto.Name, "Updated branch"); }
public virtual void UpdateBranchAddedBySameClientUser() { var branchdto = BankBranchService.GetById(9); branchdto.Name = "fCollege road"; branchdto.CAId = 5; // Same for CAId=1 and selected branchid also same branchdto.SWIFTCode = "FC1234"; branchdto.CreatedBy = 1; branchdto.ModifiedBy = 1; branchdto.WeeklyHalfDay.IsThursday = true; branchdto.WeeklyHalfDay.IsSaturday = false; this.BankBranchInstance = this.BankBranchService.Update(branchdto, CurrentUserInstance.UserName); Assert.IsTrue(this.BankBranchInstance.Name == branchdto.Name, "Updated branch"); }
public virtual void UpdateBranchBySuperAdmin() { this.BankBranchInstance = BankBranchService.GetById(14); var bankbranchdto = new BankBranchDto { BranchId = this.BankBranchInstance.BranchId, Name = "PS Road", IFSCCode = "PSIFSC01", MICRCode = "PSMICR01", SWIFTCode = "PSSWIFT01", Email1 = "*****@*****.**", Email2 = "*****@*****.**", FullDayTimeFrom = TimeSpan.FromHours(6), FullDayTimeTo = TimeSpan.FromHours(6), HalfDayTimeFrom = TimeSpan.FromHours(6), HalfDayTimeTo = TimeSpan.FromHours(6), FullDayBreakFrom = TimeSpan.FromHours(1), FullDayBreakTo = TimeSpan.FromHours(1), HalfDayBreakFrom = TimeSpan.FromHours(11), HalfDayBreakTo = TimeSpan.FromHours(11), CAId = null, CreatedBy = 1, ModifiedBy = 1, #region BankAddress BranchAddress = new AddressDto { AddressId = this.BankBranchInstance.BranchAddress.AddressId, AddressLine1 = "updated pn road", AddressLine2 = "updated near busstop", PIN = "411040", CreatedBy = -1, ModifiedBy = -1, CityVillage = new CityVillageDto { CityVillageId = 1 } }, #endregion #region BankContactDetails //BranchContactNos = new List<ContactDetailsDto> //{ // foreach(ContactDetailsDto cbDto in bankbranchdto.BranchContactNos) // { // cbDto.ContactDetailsId, // cbDto.STDCode = "020" // }; // //new ContactDetailsDto // //{ // // ContactNoType = Common.ContactType.OfficeNo, // // STDCode = "020", // // ContactNo = "27658945", // // CountryCallingCode = CountryInstance.CallingCode // //}, // //new ContactDetailsDto // //{ // // ContactNoType = Common.ContactType.Fax, // // STDCode = "020", // // ContactNo = "45646456", // // CountryCallingCode = CountryInstance.CallingCode // //} //}, #endregion WeeklyHalfDay = new WeeklyHalfDayDto { WeeklyHalfDayId = this.BankBranchInstance.WeeklyHalfDay.WeeklyHalfDayId, IsSaturday = false, IsThursday = true }, WeeklyOffDay = new WeeklyOffDaysDto { WeeklyOffDayId = this.BankBranchInstance.WeeklyOffDay.WeeklyOffDayId, IsSunday = true } }; BankDto bankdto = new BankDto { BankId = 9 }; bankbranchdto.BranchOfBank = bankdto; BankBranchDto updatedBankBranch = this.BankBranchService.Update(bankbranchdto, CurrentUserInstance.UserName); Assert.IsTrue(this.BankBranchInstance.Name == updatedBankBranch.Name, "Branch updated"); Assert.IsTrue(updatedBankBranch.Email1 != BankBranchInstance.Email1, "Branch Email1 updated"); }