CSC 227 Lecture Notes - Lecture 1: Junit, Type Safety, Binary Tree
Document Summary
Assertequals(string expected, string actual: put @test before the method, @test, public void methodname() //methodname ex: showequals . Actions: guarded action, execute an action only under certain conditions, general form: if( booleanexpression ) Something: alternative action, select between one set of actions or another, must choose one action from two alternatives, general form: if(booleanexpression) thinga. Else thingb: multiple selection, nested logic, general form: Ex: public class controlfuntest, @test, public void testgreeting() Test driven development, test first design: writing the junit test cases first, then writing the class that will be tested. 4/2/16 9:37 pm: variables that store the state of the objects (instance variables, constructors initialize the state of an object, some messages modify the state of objects, some messages provide access to the state of objects. Misc: always use meaningful names, constructors are the same name as the class, make instance variables private, make constructors (no static) and methods public.