Skip to content

Latest commit

 

History

History
 
 

junit

JUnit

Tutorial

init

$ bash junit_init.sh

create executable file

$ cd [onlyTest|testCode|beforeAfte|stack|testException1]
$ make

run testcase

$ make test

syllabus

week3

onlyTest: Only JUint test

testCode: Simple assert

week4

beforeAfter: Show execution path of before and after annotation

Stack: Use stack example show why use before and after annotation

week5

parameterized: Use JUnit @parameterized annotation to generate multiple tese case

testException1: Use stack example show how to check exception with test

testException2: Use stack example show how to check exception with test rule