CPSC 2150 - DAY 7 SEPTEMBER 8, 2016 ================================================================================ J UNIT TESTING -------------- An industry-standard framework. '@' represents a test that can be executed. public class TestCalculator { @Test public void testAdd() { Calculator c = new Calculator(); Assert.assertEquals(7, c.add(3,4)); } } multiple asserts can be present in any given test case. J Unit supports multiple @ annotations requires import org.junit.*; The @Before must be placed before the specific test method. Timed tests - expect a certain result within a certain amount of time (ex. 100 ms) Do tests on the basis of object equality, do not convert types.