static void Main(string[] args)
        {
            Bban tilinro1 = new Bban();

            tilinro1.ToString();
            Console.ReadKey();
        }
Beispiel #2
0
        public void Constructor_Empty()
        {
            var bban = new Bban();

            Assert.IsNullOrEmpty(bban.BankCode);
            Assert.IsNullOrEmpty(bban.BranchCode);
            Assert.IsNullOrEmpty(bban.AccountNumber);
            Assert.IsNullOrEmpty(bban.CheckDigits1);
            Assert.IsNullOrEmpty(bban.CheckDigits2);
            Assert.IsNullOrEmpty(bban.CheckDigits3);
            Assert.IsNullOrEmpty(bban.Value());
            Assert.IsNotNullOrEmpty(bban.ToString());
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            string defaultBankAccount = "5620092134961";

            //string userInput2 = "159030-776"; // 159030-776, 101710-122

            Console.WriteLine("Enter your bank number, ty. (e.g. 562009-2134961, 159030-776)");

            string userInput = Console.ReadLine();

            if (String.IsNullOrEmpty(userInput))
            {
                userInput = defaultBankAccount;
            }

            Bban bban = new Bban(userInput);

            Console.WriteLine("BBAN is: {0}", bban.ToString());

            Iban iban = new Iban(userInput);

            Console.WriteLine("IBAN is: {0}", iban.ToString());

            string newIban = "FI2056200920134961";

            if (Iban.Validate(newIban))
            {
                Console.WriteLine($"{newIban} is valid.");
            }
            else
            {
                Console.WriteLine($"{newIban} is invalid.");
            }

            Console.WriteLine(Iban.GetBicCode(iban.ToString()));


            // END
            Console.WriteLine("\nPress any key to continue....");
            Console.ReadKey();
        }