public void StartListener() { listener.QueueTimerInterval = 10; listener.SetMsmqLogDistributor(mockQ); listener.StartListener(); Thread.Sleep(listener.QueueTimerInterval + 300); Assert.IsTrue(mockQ.ReceiveMsgCalled, "receive initiated"); listener.StopListener(); }
public void StartListener() { //this.eventLogger.AddMessage("HEADER", "Simulated Start"); listener.QueueTimerInterval = 10; listener.SetMsmqLogDistributor(mockQ); listener.StartListener(); Thread.Sleep(listener.QueueTimerInterval + 300); Assert.IsTrue(mockQ.ReceiveMsgCalled, "receive initiated"); //this.eventLogger.WriteToLog(new Exception("simulated exception - forced event logger flush"), Severity.Error); //Assert.IsTrue(CommonUtil.LogEntryExists(SR.ListenerStarting), "start begin"); //Assert.IsTrue(CommonUtil.LogEntryExists(SR.ListenerStartComplete(listener.QueueTimerInterval)), "start complete"); listener.StopListener(); }