Hi,
I'm wanting to test that a class has an EventHandler assigned to an event. Basically I'm using my IoC Container to hook up EventHandlers for me, and I'm wanting to check they get assigned properly. So really, I'm testing my IoC config.
[Test]
public void create_person_event_handler_is_hooked_up_by_windsor()
{
IChangePersonService changePersonService = IoC.Resolve<IChangePersonService>();
// check that changePersonService.PersonCreated has a handler attached
}
I'm not sure how to test that changePersonService.PersonCreated has anything attached to it though.
Any ideas?
Thanks.