Exemplo n.º 1
0
        public void DepositWithValidAmountOmni()
        {
            float initialBalance = 200;
            float depositAmount  = 50;
            float expected       = 250;

            Customer    customer    = new Customer(4, "Allen", "02222222");
            OmniAccount omniAccount = new OmniAccount(customer, 5, initialBalance, 5, 20, 1000);

            float actual = omniAccount.Deposit(depositAmount);

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void DepositWithInvalidAmountOmni()
        {
            float initialBalance = 200;
            float depositAmount  = -50;

            Customer    customer    = new Customer(4, "Allen", "02222222");
            OmniAccount omniAccount = new OmniAccount(customer, 5, initialBalance, 5, 20, 1000);

            try
            {
                omniAccount.Deposit(depositAmount);
            }
            catch (ArgumentOutOfRangeException)
            {
                return;
            }
            Assert.Fail();
        }