O'Reilly logo

TestNg Beginner's Guide by Varun Menon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required