public void ThenThereWillBeNoErrorsInTheApplicationEventog() { var btsServer = Config.BizTalkServerName; var sources = new List <string>(); sources.Add("BizTalk Server"); Debug.WriteLine("Looging for Events"); DateTime LastApplicationLogEventDateTime = (DateTime)ScenarioContext.Current["LastApplicationLogEventDateTime"]; Debug.WriteLine("LastApplicationLogEventDateTime = " + LastApplicationLogEventDateTime.ToLongTimeString()); var errorsExist = ApplicationEventLog.GetErrors(sources, LastApplicationLogEventDateTime); Debug.WriteLine("errorsExist = " + errorsExist.ToString()); Assert.IsFalse(errorsExist, "Errors found in the Application Event Log"); }