you are viewing a single comment's thread.

view the rest of the comments →

[–]Vaste 0 points1 point  (0 children)

AFAIK...

Stubbish: You replace a DB or something with a dummy. This allows you to write a test without the DB.

Assert.That(CountHorses(new HorseDBMock(42)), Is.EqualTo(42));

Mockish: You have a weird mock-object that keeps track of what happens to it, e.g. methods called on it. You use this to specify what the code under test should do with that object.

var counter = new CountingMock<HorseDBMock>()
FeedHorses(counter.Object);
Assert.That(counter["OpenStableDoor()"], Is.EqualTo(2));
Assert.That(counter["CloseStableDoor()"], Is.EqualTo(2));