Beispiel #1
0
        public void BbanGetStructureForCountryBulgariaShouldReturnStructureForBulgaria()
        {
            BBanStructure structure = Bban.GetStructureForCountry("BG");

            Assert.IsNotNull(structure);
            Assert.AreEqual(structure.Entries.Count, 4);

            BBanEntry bankCode      = structure.Entries[0];
            BBanEntry branchCode    = structure.Entries[1];
            BBanEntry accountType   = structure.Entries[2];
            BBanEntry accountNumber = structure.Entries[3];

            Assert.AreEqual(bankCode.CharacterType, BBanEntryCharacterType.A);
            Assert.AreEqual(bankCode.EntryType, BBanEntryType.BANK_CODE);
            Assert.AreEqual(bankCode.Length, 4);

            Assert.AreEqual(branchCode.CharacterType, BBanEntryCharacterType.N);
            Assert.AreEqual(branchCode.EntryType, BBanEntryType.BRANCH_CODE);
            Assert.AreEqual(branchCode.Length, 4);

            Assert.AreEqual(accountType.CharacterType, BBanEntryCharacterType.N);
            Assert.AreEqual(accountType.EntryType, BBanEntryType.ACCOUNT_TYPE);
            Assert.AreEqual(accountType.Length, 2);

            Assert.AreEqual(accountNumber.CharacterType, BBanEntryCharacterType.C);
            Assert.AreEqual(accountNumber.EntryType, BBanEntryType.ACCOUNT_NUMBER);
            Assert.AreEqual(accountNumber.Length, 8);
        }
Beispiel #2
0
        public void GetBbanAndChangeShouldNotChangeOtherBban()
        {
            int           entryCount = 0;
            BBanStructure entry      = Bban.GetStructureForCountry("CY");

            Assert.IsNotNull(entry);
            entryCount = entry.Entries.Count();
            entry.Entries.RemoveAt(1);
            BBanStructure newEntry = Bban.GetStructureForCountry("CY");

            Assert.IsNotNull(newEntry);
            Assert.AreEqual(entryCount, newEntry.Entries.Count());
        }
Beispiel #3
0
        public void BbanGetStructureForCountryShouldReturnNullForUnsupportedCountry()
        {
            BBanStructure structure = Bban.GetStructureForCountry("XX");

            Assert.IsNull(structure);
        }
Beispiel #4
0
        public void BbanGetStructureForCountryShouldReturnStructureForSupportedCountry()
        {
            BBanStructure structure = Bban.GetStructureForCountry("CZ");

            Assert.IsNotNull(structure);
        }
Beispiel #5
0
 public BBanStructure StaticBBans()
 {
     return(Bban.GetStructureForCountry("CY"));
 }