【发布时间】:2015-02-06 06:21:53
【问题描述】:
我实现了一个 API 来处理 EventLogRecord 对象。
using System.Diagnostics.Eventing.Reader;
...
MyLog ProcessEvent(EventLogRecord eventRecord)
现在,我想为此创建单元测试,EventLogRecord 没有公共构造函数。如何在不连接事件日志系统的情况下获取EventLogRecord 对象?
【问题讨论】:
标签: c# unit-testing event-log