public void createAccountTest()
 {
     BankManager target = new BankManager(); // TODO: Initialize to an appropriate value
     bool expected = true; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.createAccount();
     Assert.AreEqual(expected, actual);
     Assert.IsTrue(expected, "Create account returned new account");
     Assert.IsFalse(!expected, "ERROR: Create account failed to return a new account");
 }
 public void displayAccountTest()
 {
     BankManager target = new BankManager(); // TODO: Initialize to an appropriate value
     bool createAccount = target.createAccount();
     if (!createAccount)
         Assert.IsFalse(!createAccount, "ERROR! Could not create account.");
     Console.WriteLine("Successfully created account.");
     bool expected = true; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.displayAccount();
     Assert.AreEqual(expected, actual);
     Assert.IsTrue(expected, "Display account successfully displayed account");
     Assert.IsFalse(!expected, "ERROR: Display account failed to display account");
 }
        static void Main(string[] args)
        {
            System.ConsoleKeyInfo KInfo;
            BankManager bankApp = new BankManager();

            bankApp.runBankApplication();

            #region Press Enter to exit...
            Console.WriteLine("Press Enter to exit....");
            KInfo = Console.ReadKey(true);
            while (KInfo.Key.ToString() != "Enter")
            {
                Console.WriteLine("Press Enter to exit...");
                KInfo = Console.ReadKey(true);
            }

            if (KInfo.Key.ToString() == "Enter")
                return;
            #endregion
        }
        public void updateAccountTest()
        {
            BankManager target = new BankManager(); // TODO: Initialize to an appropriate value
            bool createAccount = target.createAccount();
            if (!createAccount)
                Assert.IsFalse(!createAccount, "ERROR! Could not create account.");
            Console.WriteLine("Successfully created account.");
            target.NumberAccounts++;
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.updateAccount();
            try
            {
                Assert.AreEqual(expected, actual);
                Assert.IsTrue(expected, "Account update successful.");
                Assert.IsFalse(!expected, "Account update teriminated with error.");
            }
            catch (Exception e)
            {

            }
        }
 public void getMenuOptionTest()
 {
     BankManager target = new BankManager(); // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.getMenuOption();
     Assert.AreEqual(expected, actual);
     Assert.IsTrue(expected == 0, "Get menu option returned expected value");
     Assert.IsFalse(expected != 0, "Get menu option did not return expected value");
 }
        public void findAccountTest()
        {
            BankManager target = new BankManager(); // TODO: Initialize to an appropriate value

            // Create an account with accountNumber = 0
            bool createAccount = target.createAccount();
            if (!createAccount)
                Assert.IsFalse(!createAccount, "ERROR! Could not create account.");
            Console.WriteLine("Successfully created account.");
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.findAccount();
            Assert.AreEqual(expected, actual);
            Assert.IsTrue((expected == actual), "Find account successfully found account.");
            Assert.IsFalse((expected != actual), "Find account unable to find account.");
        }
 public void displayMenuTest()
 {
     BankManager target = new BankManager(); // TODO: Initialize to an appropriate value
     target.displayMenu();
     Assert.IsTrue(true, "The display menu test assumes ability to print to console.");
 }