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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!