Question
C# Unit Test Project (.NET Framework) Account Class needs to hold the debit,credit and transfer functions that the AccountTest class will call and test using
C# Unit Test Project (.NET Framework)
Account Class needs to hold the debit,credit and transfer functions that the AccountTest class will call and test using the [TestMethod] logic.
Write a class called Account.
This Account class represents a persons bank account for a bank. It should have a debit function that debits a given amount from the balance. If it will make the account go negative, it should throw an Insufficient funds Exception.
It should also have a credit function that adds a given amount to the balance. It should have a transfer function that takes an account and transfers a given amount to that account by calling the credit function.
Create an AccountTest class that tests the credit, debit and transfer functions.
There has to be two tests to test the functions(credit/debit).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started