本文整理匯總了C#中SirenOfShame.Test.Unit.Watcher.RulesEngineWrapper.InvokeServerUnavailable方法的典型用法代碼示例。如果您正苦於以下問題:C# RulesEngineWrapper.InvokeServerUnavailable方法的具體用法?C# RulesEngineWrapper.InvokeServerUnavailable怎麽用?C# RulesEngineWrapper.InvokeServerUnavailable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SirenOfShame.Test.Unit.Watcher.RulesEngineWrapper
的用法示例。
在下文中一共展示了RulesEngineWrapper.InvokeServerUnavailable方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ServerUnavailableThenAvailableThenUnavailable_TwoUnavailableTrayNotificationSent
public void ServerUnavailableThenAvailableThenUnavailable_TwoUnavailableTrayNotificationSent()
{
var rulesEngine = new RulesEngineWrapper();
rulesEngine.InvokeServerUnavailable(new ServerUnavailableException("The network is down."));
rulesEngine.InvokeStatusChecked(new BuildStatus[] { });
rulesEngine.InvokeServerUnavailable(new ServerUnavailableException("The network is down."));
Assert.AreEqual(3, rulesEngine.TrayNotificationEvents.Count);
Assert.AreEqual(2,
rulesEngine.TrayNotificationEvents.Where(tn => tn.Title == "Build Server Unavailable").Count
());
}
示例2: InitialServerUnavailable_DisconnectedTrayNotificationSent
public void InitialServerUnavailable_DisconnectedTrayNotificationSent()
{
var rulesEngine = new RulesEngineWrapper();
rulesEngine.InvokeServerUnavailable(new ServerUnavailableException("The network is down."));
Assert.AreEqual(1, rulesEngine.TrayNotificationEvents.Count);
var trayNotification = rulesEngine.TrayNotificationEvents[0];
Assert.AreEqual("Build Server Unavailable", trayNotification.Title);
Assert.AreEqual("The connection will be restored when possible.", trayNotification.TipText);
Assert.AreEqual(ToolTipIcon.Error, trayNotification.TipIcon);
}
示例3: ServerUnavailableThenBecomesAvailable_ReconnectedTrayNotificationSent
public void ServerUnavailableThenBecomesAvailable_ReconnectedTrayNotificationSent()
{
var rulesEngine = new RulesEngineWrapper();
rulesEngine.InvokeServerUnavailable(new ServerUnavailableException("The network is down."));
rulesEngine.InvokeStatusChecked(new BuildStatus[] { });
Assert.AreEqual(2, rulesEngine.TrayNotificationEvents.Count);
var trayNotification = rulesEngine.TrayNotificationEvents[1];
Assert.AreEqual("Reconnected", trayNotification.Title);
Assert.AreEqual("Reconnected to server.", trayNotification.TipText);
Assert.AreEqual(ToolTipIcon.Info, trayNotification.TipIcon);
}
示例4: ServerUnavailableTwice_OnlyOneTrayNotificationSent
public void ServerUnavailableTwice_OnlyOneTrayNotificationSent()
{
var rulesEngine = new RulesEngineWrapper();
rulesEngine.InvokeServerUnavailable(new ServerUnavailableException("The network is down."));
rulesEngine.InvokeServerUnavailable(new ServerUnavailableException("The network is down."));
Assert.AreEqual(1, rulesEngine.TrayNotificationEvents.Count);
}
示例5: ServerUnavailableThenAvailableTwice_OnlyOneReconnectedTrayNotification
public void ServerUnavailableThenAvailableTwice_OnlyOneReconnectedTrayNotification()
{
var rulesEngine = new RulesEngineWrapper();
rulesEngine.InvokeServerUnavailable(new ServerUnavailableException("The network is down."));
rulesEngine.InvokeStatusChecked(new BuildStatus[] { });
rulesEngine.InvokeStatusChecked(new BuildStatus[] { });
Assert.AreEqual(2, rulesEngine.TrayNotificationEvents.Count);
}