• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

dev


コミットメタ情報

リビジョン37c4cd1882bec0733af1a201271291c03067991c (tree)
日時2013-06-11 01:29:10
作者Kimura Youichi <kim.upsilon@bucy...>
コミッターKimura Youichi

ログメッセージ

テストケース壊しまくってたので修正

変更サマリ

差分

--- a/OpenTween.Tests/Api/TwitterApiStatusTest.cs
+++ b/OpenTween.Tests/Api/TwitterApiStatusTest.cs
@@ -83,7 +83,7 @@ namespace OpenTween.Api
8383 [TestCaseSource("ParseRateLimit_TestCase")]
8484 public void ParseRateLimitTest(IDictionary<string, string> header, ApiLimit expect)
8585 {
86- var limit = TwitterApiStatus.ParseRateLimit(header, "X-RateLimit");
86+ var limit = TwitterApiStatus.ParseRateLimit(header, "X-RateLimit-");
8787 Assert.That(limit, Is.EqualTo(expect));
8888 }
8989
--- a/OpenTween.Tests/ToolStripAPIGaugeTest.cs
+++ b/OpenTween.Tests/ToolStripAPIGaugeTest.cs
@@ -65,21 +65,39 @@ namespace OpenTween
6565 {
6666 // toolStrip.ApiLimit の初期値は null
6767
68- Assert.That(toolStrip.Text, Is.EqualTo("API ???/???"));
68+ Assert.That(toolStrip.Text, Is.EqualTo("API v1.1 ???/???"));
6969 Assert.That(toolStrip.ToolTipText, Is.EqualTo("API rest ???/???" + Environment.NewLine + "(reset after ??? minutes)"));
7070
71- toolStrip.ApiLimit = new ApiLimit(150, 100, DateTime.Now.AddMinutes(10));
71+ toolStrip.ApiLimit = new ApiLimit(15, 14, DateTime.Now.AddMinutes(15));
7272
73- Assert.That(toolStrip.Text, Is.EqualTo("API 100/150"));
74- Assert.That(toolStrip.ToolTipText, Is.EqualTo("API rest 100/150" + Environment.NewLine + "(reset after 10 minutes)"));
73+ Assert.That(toolStrip.Text, Is.EqualTo("API v1.1 14/15"));
74+ Assert.That(toolStrip.ToolTipText, Is.EqualTo("API rest 14/15" + Environment.NewLine + "(reset after 15 minutes)"));
7575
7676 toolStrip.ApiLimit = null;
7777
78- Assert.That(toolStrip.Text, Is.EqualTo("API ???/???"));
78+ Assert.That(toolStrip.Text, Is.EqualTo("API v1.1 ???/???"));
7979 Assert.That(toolStrip.ToolTipText, Is.EqualTo("API rest ???/???" + Environment.NewLine + "(reset after ??? minutes)"));
8080 }
8181 }
8282
83+ [Test]
84+ public void API11EnabledTest()
85+ {
86+ using (var toolStrip = new ToolStripAPIGauge())
87+ {
88+ // toolStrip.API11Enabled の初期値は true
89+ Assert.That(toolStrip.Text, Is.EqualTo("API v1.1 ???/???"));
90+
91+ toolStrip.API11Enabled = false;
92+
93+ Assert.That(toolStrip.Text, Is.EqualTo("API v1 ???/???"));
94+
95+ toolStrip.API11Enabled = true;
96+
97+ Assert.That(toolStrip.Text, Is.EqualTo("API v1.1 ???/???"));
98+ }
99+ }
100+
83101 class TestToolStripAPIGauge : ToolStripAPIGauge
84102 {
85103 public DateTime Now { get; set; } // 現在時刻