コード例 #1
0
        public void CreateEventLogContainerShouldCreateNegativeEndIndexIfLogEntriesAreEmpty()
        {
            var dict = new Dictionary <string, IEventLogContainer>();
            var dummyEventLogContainer = new DummyEventLogContainer(false);

            dict.Add("DummyEventLog", dummyEventLogContainer);

            this.eventLogSessionContext = new EventLogSessionContext(dict);
            this.eventLogSessionContext.CreateEventLogContainerStartIndexMap();
            this.eventLogSessionContext.CreateEventLogContainerEndIndexMap();

            Assert.IsTrue(this.eventLogSessionContext.EventLogContainerStartIndexMap["DummyEventLog"] == 0);
            Assert.IsTrue(this.eventLogSessionContext.EventLogContainerEndIndexMap["DummyEventLog"] == -1);
        }
コード例 #2
0
 public EventLogSessionContextTests()
 {
     this.mockEventLogContainer = new DummyEventLogContainer(true);
     this.eventLogContainersMap = new Dictionary <string, IEventLogContainer>();
     this.eventLogContainersMap.Add("LogName", this.mockEventLogContainer);
 }