當前位置: 首頁>>代碼示例>>C#>>正文


C# RulesEngineWrapper.InvokeServerUnavailable方法代碼示例

本文整理匯總了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
                         ());
 }
開發者ID:mightymuke,項目名稱:SirenOfShame,代碼行數:11,代碼來源:RulesEngineTest.cs

示例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);
 }
開發者ID:mightymuke,項目名稱:SirenOfShame,代碼行數:10,代碼來源:RulesEngineTest.cs

示例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);
 }
開發者ID:mightymuke,項目名稱:SirenOfShame,代碼行數:11,代碼來源:RulesEngineTest.cs

示例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);
 }
開發者ID:mightymuke,項目名稱:SirenOfShame,代碼行數:7,代碼來源:RulesEngineTest.cs

示例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);
 }
開發者ID:mightymuke,項目名稱:SirenOfShame,代碼行數:8,代碼來源:RulesEngineTest.cs


注:本文中的SirenOfShame.Test.Unit.Watcher.RulesEngineWrapper.InvokeServerUnavailable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。