public void testdeleteAccountFail()
        {
            BankManager a = new BankManager(2);
            string test = @"1
            young
            12.34
            11/13/13";
            StringWriter sw = new StringWriter();
            StringReader sr = new StringReader(test);

            Console.SetIn(sr);
            Console.SetOut(sw);
            a.createAccount();
            test = @"2
            young
            12.34
            11/13/13";
            Console.SetIn(sr);
            Console.SetOut(sw);
            a.createAccount();
            test = @"20
            ";
            sr = new StringReader(test);
            Console.SetIn(sr);
            Console.SetOut(sw);
            Assert.IsFalse(a.deleteAccount());
            test = @"10
            ";
            sr = new StringReader(test);
            Console.SetIn(sr);
            Console.SetOut(sw);
            Assert.IsFalse(a.deleteAccount());
        }
 public void testCreateAccountFail([Values(1,2)] int size)
 {
     BankManager a = new BankManager(size);
     string test = @"1
     young
     12.34
     11/13/13";
     StringWriter sw = new StringWriter();
     StringReader sr = new StringReader(test);
     for (int i = 0; i < size; i++ )
     {
         Console.SetIn(sr);
         Console.SetOut(sw);
         a.createAccount();
         Console.SetIn(sr);
         Console.SetOut(sw);
     }
     Assert.IsFalse(a.createAccount());
 }
        public void testCreateAccountSuccess([Values(1,2,3,500)] int size)
        {
            BankManager a = new BankManager(size);
            string test = @"1
            young
            12.34
            11/13/13";
            StringWriter sw = new StringWriter();
            StringReader sr = new StringReader(test);

            Console.SetIn(sr);
            Console.SetOut(sw);

            Assert.IsTrue(a.createAccount());
        }
        public void testUpdateAccountSuccess()
        {
            BankManager a = new BankManager(1);
            string test = @"1
            young
            15.34
            11/13/13";
            StringWriter sw = new StringWriter();
            StringReader sr = new StringReader(test);

            Console.SetIn(sr);
            Console.SetOut(sw);
            a.createAccount();

            test = @"1
            1
            hello";
            sr = new StringReader(test);
            Console.SetIn(sr);
            Console.SetOut(sw);
            Assert.IsTrue(a.updateAccount());
            test = @"1
            2
            14.00
            ";
            sr = new StringReader(test);
            Console.SetIn(sr);
            Console.SetOut(sw);
            Assert.IsTrue(a.updateAccount());
            test = @"1
            3
            14.00";
            sr = new StringReader(test);
            Console.SetIn(sr);
            Console.SetOut(sw);
            Assert.IsTrue(a.updateAccount());
        }