Junior Testing

What is mocking vs spying in unit testing?

  • Mocking involves creating objects that simulate behavior and expectations to verify

interactions.

  • Spying records information about how real or partial objects are used, focusing on

what happened rather than controlling behavior.

More from C# Programming Tutorial

All questions for this course