コード例 #1
0
 public void BankCodesCanBeAddedToTictionariesAfterInitialization()
 {
     BankCodes bankCodesEmpty = new BankCodes();
     List<BankCode> bankCodesList = new List<BankCode>();
     bankCodesList.Add(new BankCode("0128", "BANKINTER, S.A.", "BKBKESMMXXX"));
     bankCodesList.Add(new BankCode("2100", "CAIXABANK, S.A.", "CAIXESBBXXX"));
     bankCodesEmpty.AddBankCodesToDictionaries(bankCodesList);
     Assert.AreEqual(2, bankCodesEmpty.BankDictionaryByBIC.Count);
     Assert.AreEqual("CAIXESBBXXX", bankCodesEmpty.BankDictionaryByLocalBankCode["2100"].BankBIC);
 }
コード例 #2
0
 public void BankCodesWithDuplicatedValuesInLocalBankCodeOrBICAreNotAdded()
 {
     BankCodes bankCodesEmpty = new BankCodes();
     List<BankCode> banksList = new List<BankCode>();
     banksList.Add(new BankCode("0128", "BANKINTER, S.A.", "BKBKESMMXXX"));
     banksList.Add(new BankCode("2100", "CAIXABANK, S.A.", "CAIXESBBXXX"));
     bankCodesEmpty.AddBankCodesToDictionaries(banksList);
     Assert.AreEqual(2, bankCodesEmpty.BankDictionaryByBIC.Count);
     List<BankCode> listOfBanksToAdd = new List<BankCode>();
     BankCode bankWithDuplicatedLocalBankCode = new BankCode("0128", "DUPLICATED LOCAL BANK CODE", "DBNKCMMXXX");
     BankCode bankWithDuplicatedBIC = new BankCode("9009", "DUPLICATED BIC", "CAIXESBBXXX");
     BankCode corrrectBank = new BankCode("0156", "THE ROYAL BANK OF SCOTLAND PLC, SUCURSAL EN ESPAÑA.", "ABNAESMMXXX");
     listOfBanksToAdd.Add(bankWithDuplicatedLocalBankCode);
     listOfBanksToAdd.Add(bankWithDuplicatedBIC);
     listOfBanksToAdd.Add(corrrectBank);
     bankCodesEmpty.AddBankCodesToDictionaries(listOfBanksToAdd);
     Assert.AreEqual(3, bankCodesEmpty.BankDictionaryByBIC.Count);
     Assert.AreEqual("BKBKESMMXXX", bankCodesEmpty.BankDictionaryByLocalBankCode["0128"].BankBIC);
     Assert.AreEqual("ABNAESMMXXX", bankCodesEmpty.BankDictionaryByLocalBankCode["0156"].BankBIC);
 }