Rhino Mocks Users, I am reading up on how to test whether an event was raised properly. Qualifying word: properly.
Basically, what we've got is a host (or a bevy depending on how you quantify that) of Quantities of various Dimensions. A Quantity has a BaseValue, which when that changes, a Changed event is fired. Simple enough test case, as you can imagine. Say we have a new Length(10.0) (matters not the units at this point). When new Length(10.0).BaseValue = 20.0, for instance, we should be able to see evidence of that by an event having been raised (for starters). So... To the Rhino portion of my inquiry. I am reading a ton of examples that basically say, hook up this event listener with a mocked event source and test that the event can be raised. To which I must humbly respond: whoop-dee-doo! Anyone can test that a method was called. That's easy. What I want to get after is whether, in our scenario, the Changed event was indeed raised on account of the real-world condition having been met, i.e. the BaseValue indeed changed. We can setup our expectations accordingly I think provided our before and after values are set accordingly. If before ~= after (within some tolerance), then we can expect the event will not be raised. Otherwise, do indeed expect the event will be raised. Can someone direct me to a set of tutorials that get after this type of thing? Thanks... Regards, Michael -- You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rhinomocks?hl=en.
