Fading Coder

One Final Commit for the Last Sprint

Unit Testing with JUnit and EasyMock: Three Practical Examples

Example 1: Pure Java Testing Requirement Build a simple currency fund selector supporting CNY (Chinese Yuan), USD (US Dollar), GBP (British Pound), EUR (Euro), and CAD (Canadian Dollar). The selector algorithm chooses the currency with the highest exchange rate for investmant. This example demonstra...

Unit Testing Rectangle Class Methods with JUnit

Testing Rectangle Class with JUnit Source Code Structure The Rectangle class under test contains dimensions, area/perimeter calculations, and a generic maximum finder with custom comparators: import java.util.Comparator; public class Rectangle { private int length; private int width; public Rectangl...