Skip to content

abhivaikar/fruitstore-unittests-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fruitstore-unittests-demo

This is a demo project for implementing unit tests with 2 different approaches:

  • Classical approach - Isolation of the tests instead of isolation of code under test.
  • Mockist approach - Isolation of the code under test (class/function). Any dependencies are mocked.

Project Details

  • Java
  • Maven
  • JUnit
  • Mockito for mocking dependencies
  • Jacoco for code coverage

Project structure

  • The source classes are in src/main/java
  • The unit test classes are in src/test/java

How to run the tests?

  • Pre-requisite: You need to have maven & JDK 11 installed on your system.
  • Clone this repository and run mvn clean test from the command line.
  • To see coverage report, open the index.html file in target/site/jacoco/index.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages