Answer by jyoungdev for Unit Testing Mock/Stub definitions in Moq
Indeed, Moq can create true stubs. From the Moq Quick Start page:* Setup a property so that it will automatically start tracking its value (also known as Stub): // start "tracking" sets/gets to this...
View ArticleAnswer by Eric King for Unit Testing Mock/Stub definitions in Moq
According to the Moq project site, Moq provides:Granular control over mock behavior with a simple MockBehavior enumeration (no need to learn what's the theoretical difference between a mock, a stub, a...
View ArticleAnswer by Don Roby for Unit Testing Mock/Stub definitions in Moq
Martin Fowler wrote a good article, Mocks Aren't Stubs, which I think makes the distinction clear.Mocks are used for behavior verification, while stubs supply fake data and normally participate in...
View ArticleAnswer by eglasius for Unit Testing Mock/Stub definitions in Moq
imho its just that its kind of a silly discussion. What matters is that you use the mocks/stubs to assert what you need to in the test, and don't assert what you don't.
View ArticleUnit Testing Mock/Stub definitions in Moq
Any reading or advice I've been given on Unit Testing has always suggested a distinct difference between the definition of a Mock and a Stub. My current understanding of these definitions are as...
View Article
More Pages to Explore .....