void function ( ) { final Point loc0 = new Point ( 0 , 0 ) ; final Point loc1 = new Point ( 4 , 0 ) ; final Point loc2 = new Point ( 0 , 4 ) ; final Triangle loc3 = new Triangle ( loc0 , loc1 , loc2 ) ; final double loc4 = loc3 . loc4 ( ) ; assertEquals ( 1.0 / 2.0 * 4.0 * 4.0 , loc4 , PRECISION ) ; }
... test that checks if the area of the triangle is calculated correctly concode_field_sep double PRECISION concode_field_sep void whenPointsInLineThenReturnNull