I am building (yet another) Windows Service, using TDD and Moles. This project includes extensions to System.Dagnostics.EventLog, tot include details of the input parameter Exception object in the log message. I must verify the exception details and those of inner exceptions are being properly written to the event log. The extensions ultimately call System.Dagnostics.EventLog.WriteEntry.
I want to inject a detour to System.Diagnostics.Moles.MEventLog.WriteEntry. However, MEventLog doesn't exist (there is no SEventLog). Any ideas of how to isolate event log interaction?