Beispiel #1
0
        public void TestGetSpecificAccount_GetSpecificAccountWhenNameMatches_SpecificAccountWithMatchingName()
        {
            #region Arrange
            Customer customer = new Customer("Per Persson");
            Account account = new Account("Poker winnings", 6500, false);
            customer.AddAccount(account);
            #endregion

            #region Act
            Account matchingAccount = customer.GetSpecificAccount("Poker winnings");
            string result = matchingAccount.GetAccountName();
            string expected = "Poker winnings";
            #endregion

            #region Assert
            Assert.AreEqual(expected, result);
            #endregion
        }
Beispiel #2
0
        public void TestGetSpecificAccount_GetAccountWhenNoAccount_Null()
        {
            #region Arrange
            Customer customer = new Customer("Per Persson");
            #endregion

            #region Act
            Account result = customer.GetSpecificAccount("Savings account");
            Account expected = null;
            #endregion

            #region Assert
            Assert.AreEqual(expected, result);
            #endregion
        }