Stop Mocking Me!

Crash Test Dummy

Meeting Topics

In a past meeting we talked (and practiced) the idea of dependency inversion (as part of SOLID development). Typically we implement dependency inversion by having our classes depend on interfaces. The convenient part about using interfaces is that we can create special instances of those interfaces to help verify the code-under-test is indeed doing what we expect. Such instances are usually called mocks. Sometimes we may need to pass instances that let us ignore certain dependencies so that we can get to the meat of what needs to be tested. These instances are usually called stubs. (Depending on the source, these mock objects go by various names depending on what role they play.)

In this month’s meeting, we’ll cover the various flavors of mocks and where they can come in useful for testing your code. Many of these constructs can be written “by hand,” but of course we software developers live to automate things and make them more efficient, so we’ll talk a bit about Rhino Mocks, a mocking framework that does some of the bookkeeping for you. We’ll follow up the learning session with some practice as well.

Logistics

The meeting will be on Thursday, October 11 at 6pm. (Click here to RSVP.) As usual we will have food and refreshments. If you have special requests for food (e.g., vegetarian-friendly), please leave us a comment below.

Like last time, this month’s meeting is being held at the Aerotek office on Cedar Bluff. The address is 408 N. Cedar Bluff Rd. Suite 140 on the first floor of the first office building behind Papa John’s on Cedar Bluff.

Resources

Sponsors

[whoscoming event_id=”14″]
(Photo credit)

0 Comments

Leave A Reply

You must be logged in to post a comment.