Lesson 12

Unit testing

Objectives

  • Testing Java applications using JUnit
  • Understand model - view - controller design pattern

Documentation

Exercises

Exercise 1

Clone repository https://iahim_hl@bitbucket.org/iahim_hl/exemple-lab-testare-isp-2019.git using command:

git clone https://iahim_hl@bitbucket.org/iahim_hl/exemple-lab-testare-isp-2019.git

Cd to temaplate project:

 cd /template 

Run tests using command:

 mvn test 

Execute program using command:

 mvn compile exec:java 

Exercise 2

Test application in folder /vehicle and correct it so that tests pass.

Exercise 3

Test application in folder /vehicle-2 and correct it so that tests pass.

Exercise 4

Test application in folder /bank-account and correct it so that tests pass.

Exercise 4

Create tests for application in folder /device-test.