Hanselminutes with Scott Hanselman cover image

The Art of Unit Testing with Roy Osherove

Hanselminutes with Scott Hanselman

00:00

How to Write a Unit Test for a Data Access Layer

A mock is something that I will assert against. You might have behavior and I'm not asserting against it, then it's a stub. But a mock actually has some behavior that I might assert against. Now in the book X unit test patterns, there are more definitions of these kinds of fake objects. There's tests pi, there's test double and all that kind of stuff. And they all are just subcategories of that fake object that I just talked about. If you're just getting started, there is no need to learn about all these different things.

Play episode from 11:26
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app