Can I test the assertion that an event was fired? Something like this:
[TestMethod]
public void EventFiresWhenChangingProperty()
{
var sut = new SystemUnderTest();
var eventRegister = new EventRegister(sut.PropertyChanged);
sut.AnyProperty = "new value";
Assert.EventWasFired(eventRegister);
}
Of course I could create an event handler, that puts some record into the test context or in an instance variable that is only read by this specific test but this seems a little bit too much plumbing. I am looking for something like the code above.