Lesson 10 of 21

Terminology

Duration: 0:56 Watch on YouTube (external link, opens in new tab)

Markdown version

In this lesson

Roy Osherove contrasts his simple terminology with the book xUnit Test Patterns, which gives many different names to things that look like other things. He only uses fakes (external link, opens in new tab): a fake that is asserted on is a mock (external link, opens in new tab), any other fake is a stub (external link, opens in new tab), and terms such as test spy can be learned later.

Transcript

158 words

[00:04] (external link, opens in new tab) So I hope that makes some sense. Are there any questions so far? Okay. So just to remind you, we have the terminology we're using. Now there are many different terminologies. The the the one on the right is from a book called xUnit Test Patterns. It's a very good book, but the it assumes it gives many different names to all these things that look like other things. And I find that that's very confusing. So I just use a very very simple terminology. I I either have I I have fakes (external link, opens in new tab) and whether they're being asserted on or not,

[00:40] (external link, opens in new tab) That's the only difference. So if you assert on the fake, it's a mock (external link, opens in new tab). Otherwise, it's a stub (external link, opens in new tab). That's the only thing that you should know currently. And you can always learn about the other things like test spy, etc. But for now, if you just think about it like that, it should simplify your life very