Account.java - Source code for the class used in examples of this tutorial
Below is the code for a sample java class Account.java that has been tested in the junit testing examples in the previous pages.
package com.techfundaes.junit4Bag; public class Account { boolean loggedIn = false; int balanceAmount = 0; public Account transact(int creditAmount) { balanceAmount = balanceAmount + creditAmount; return this; } public Account merge(Account account) { balanceAmount = balanceAmount + account.balanceAmount; return this; } }