Time for action – using Mockito

  1. Create a new Java Project named MockitoTestProject in eclipse with the folder and file structure as shown in the following screenshot:
    Time for action – using Mockito
  2. Copy the code for the Calculator.java file from the previously created project on to the file Calculator.java in the current project. You can also replace the existing file with the one from the previously created project as they are both the same.
  3. Copy the code for the AreaFinder.java file from the earlier section in to the file AreaFinder.java in the current project. You can also replace the existing file with the one from the previously created project as they are both the same.

Get TestNg Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.