Thursday, 26 November 2020

Mocks Vs Stub


Test Doubles --> Mocks (mock, spy)     Stub (stub, dummy, fake)


  • Waits to be called by the class under Test.

  • Mock object are used for behaviour verification.

  • Mock can fail the test.

  • It can provide data and logic needed by the class.

source: internet


  • Gives out data that goes under class/object under test.

  • Stub object are used for state verification.

  • Stub cannot fail the test, it returns stub value.

  • Data is directly injected into the class.

Thank you!

Satender Kumar Mall
Twitter: @satenderiiit

Wednesday, 25 November 2020

Legend Diego Maradona

 The legends never dies they live forever in our memories....Om Shanti

Folded hands
Diego Maradona

Thank you!

Satender Kumar Mall
Twitter: @satenderiiit