dev
Révision | b032cf63bc440736efc7b659a385736e43aaf835 (tree) |
---|---|
l'heure | 2013-02-08 05:00:01 |
Auteur | Kimura Youichi <kim.upsilon@bucy...> |
Commiter | Kimura Youichi |
改行コードの修正 (CRLF -> LF)
@@ -1,137 +1,137 @@ | ||
1 | -// OpenTween - Client of Twitter | |
2 | -// Copyright (c) 2012 the40san <http://sourceforge.jp/users/the40san/> | |
3 | -// All rights reserved. | |
4 | -// | |
5 | -// This file is part of OpenTween. | |
6 | -// | |
7 | -// This program is free software; you can redistribute it and/or modify it | |
8 | -// under the terms of the GNU General public License as published by the Free | |
9 | -// Software Foundation; either version 3 of the License, or (at your option) | |
10 | -// any later version. | |
11 | -// | |
12 | -// This program is distributed in the hope that it will be useful, but | |
13 | -// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
14 | -// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General public License | |
15 | -// for more details. | |
16 | -// | |
17 | -// You should have received a copy of the GNU General public License along | |
18 | -// with this program. If not, see <http://www.gnu.org/licenses/>, or write to | |
19 | -// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, | |
20 | -// Boston, MA 02110-1301, USA. | |
21 | - | |
22 | -using System; | |
23 | -using System.Collections.Generic; | |
24 | -using System.Linq; | |
25 | -using System.Text; | |
26 | -using System.Threading.Tasks; | |
27 | -using NUnit.Framework; | |
28 | - | |
29 | - | |
30 | -namespace OpenTween | |
31 | -{ | |
32 | - [TestFixture] | |
33 | - public class ApiInformationTest | |
34 | - { | |
35 | - [Test] | |
36 | - public void Initialize() | |
37 | - { | |
38 | - ApiInformation apiinfo = new ApiInformation(); | |
39 | - apiinfo.Initialize(); | |
40 | - | |
41 | - Assert.That(apiinfo.HttpHeaders["X-RateLimit-Remaining"], Is.EqualTo("-1")); | |
42 | - Assert.That(apiinfo.HttpHeaders["X-RateLimit-Limit"], Is.EqualTo("-1")); | |
43 | - Assert.That(apiinfo.HttpHeaders["X-RateLimit-Reset"], Is.EqualTo("-1")); | |
44 | - | |
45 | - Assert.That(apiinfo.HttpHeaders["X-Access-Level"], Is.EqualTo("read-write-directmessages")); | |
46 | - | |
47 | - Assert.That(apiinfo.HttpHeaders["X-MediaRateLimit-Remaining"], Is.EqualTo("-1")); | |
48 | - Assert.That(apiinfo.HttpHeaders["X-MediaRateLimit-Limit"], Is.EqualTo("-1")); | |
49 | - Assert.That(apiinfo.HttpHeaders["X-MediaRateLimit-Reset"], Is.EqualTo("-1")); | |
50 | - | |
51 | - | |
52 | - } | |
53 | - | |
54 | - [Test] | |
55 | - [Combinatorial] | |
56 | - public void Test_MaxCount([Values(100, 0, -100)]int value) | |
57 | - { | |
58 | - ApiInformation apiinfo = new ApiInformation(); | |
59 | - apiinfo.MaxCount = value; | |
60 | - Assert.That(apiinfo.MaxCount, Is.EqualTo(value)); | |
61 | - } | |
62 | - | |
63 | - | |
64 | - [TestCase(-100, Result = -100)] | |
65 | - [TestCase(0, Result = 0)] | |
66 | - [TestCase(100, Result = 100)] | |
67 | - [TestCase(int.MaxValue, Result = int.MaxValue)] | |
68 | - [TestCase(int.MinValue, Result = int.MinValue)] | |
69 | - public int Test_RemainCount(int value) | |
70 | - { | |
71 | - ApiInformation apiinfo = new ApiInformation(); | |
72 | - apiinfo.RemainCount = value; | |
73 | - return apiinfo.RemainCount; | |
74 | - } | |
75 | - | |
76 | - | |
77 | - | |
78 | - | |
79 | - | |
80 | - [TestCase(-100, Result = -100)] | |
81 | - [TestCase(0, Result = 0)] | |
82 | - [TestCase(100, Result = 100)] | |
83 | - [TestCase(int.MaxValue, Result = int.MaxValue)] | |
84 | - [TestCase(int.MinValue, Result = int.MinValue)] | |
85 | - public int Test_MediaMaxCount(int value) | |
86 | - { | |
87 | - ApiInformation apiinfo = new ApiInformation(); | |
88 | - apiinfo.MediaMaxCount = value; | |
89 | - return apiinfo.MediaMaxCount; | |
90 | - } | |
91 | - | |
92 | - [TestCase(-100, Result = -100)] | |
93 | - [TestCase(0, Result = 0)] | |
94 | - [TestCase(100, Result = 100)] | |
95 | - [TestCase(int.MaxValue, Result = int.MaxValue)] | |
96 | - [TestCase(int.MinValue, Result = int.MinValue)] | |
97 | - public int Test_ResetTimeInSeconds(int value) | |
98 | - { | |
99 | - ApiInformation apiinfo = new ApiInformation(); | |
100 | - apiinfo.ResetTimeInSeconds = value; | |
101 | - return apiinfo.ResetTimeInSeconds; | |
102 | - } | |
103 | - | |
104 | - [TestCase(-100, Result = -100)] | |
105 | - [TestCase(0, Result = 0)] | |
106 | - [TestCase(100, Result = 100)] | |
107 | - [TestCase(int.MaxValue, Result = int.MaxValue)] | |
108 | - [TestCase(int.MinValue, Result = int.MinValue)] | |
109 | - public int Test_UsingCount(int value) | |
110 | - { | |
111 | - ApiInformation apiinfo = new ApiInformation(); | |
112 | - apiinfo.UsingCount = value; | |
113 | - return apiinfo.UsingCount; | |
114 | - } | |
115 | - | |
116 | - //↓以下DateTime系 | |
117 | - | |
118 | - [Test] | |
119 | - public void Test_ConvertResetTimeInSecondsToResetTime() | |
120 | - { | |
121 | - ApiInformation apiinfo = new ApiInformation(); | |
122 | - DateTime d = apiinfo.ConvertResetTimeInSecondsToResetTime(-1); | |
123 | - Assert.That(d, Is.EqualTo(new DateTime())); | |
124 | - } | |
125 | - | |
126 | - [Test] | |
127 | - public void Test_MediaResetTime() | |
128 | - { | |
129 | - ApiInformation apiinfo = new ApiInformation(); | |
130 | - DateTime d = new DateTime(1970, 1, 1, 0, 0, 0); | |
131 | - apiinfo.MediaResetTime = d; | |
132 | - Assert.That(apiinfo.MediaResetTime, Is.EqualTo(d)); | |
133 | - } | |
134 | - | |
135 | - | |
136 | - } | |
137 | -} | |
1 | +// OpenTween - Client of Twitter | |
2 | +// Copyright (c) 2012 the40san <http://sourceforge.jp/users/the40san/> | |
3 | +// All rights reserved. | |
4 | +// | |
5 | +// This file is part of OpenTween. | |
6 | +// | |
7 | +// This program is free software; you can redistribute it and/or modify it | |
8 | +// under the terms of the GNU General public License as published by the Free | |
9 | +// Software Foundation; either version 3 of the License, or (at your option) | |
10 | +// any later version. | |
11 | +// | |
12 | +// This program is distributed in the hope that it will be useful, but | |
13 | +// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
14 | +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General public License | |
15 | +// for more details. | |
16 | +// | |
17 | +// You should have received a copy of the GNU General public License along | |
18 | +// with this program. If not, see <http://www.gnu.org/licenses/>, or write to | |
19 | +// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, | |
20 | +// Boston, MA 02110-1301, USA. | |
21 | + | |
22 | +using System; | |
23 | +using System.Collections.Generic; | |
24 | +using System.Linq; | |
25 | +using System.Text; | |
26 | +using System.Threading.Tasks; | |
27 | +using NUnit.Framework; | |
28 | + | |
29 | + | |
30 | +namespace OpenTween | |
31 | +{ | |
32 | + [TestFixture] | |
33 | + public class ApiInformationTest | |
34 | + { | |
35 | + [Test] | |
36 | + public void Initialize() | |
37 | + { | |
38 | + ApiInformation apiinfo = new ApiInformation(); | |
39 | + apiinfo.Initialize(); | |
40 | + | |
41 | + Assert.That(apiinfo.HttpHeaders["X-RateLimit-Remaining"], Is.EqualTo("-1")); | |
42 | + Assert.That(apiinfo.HttpHeaders["X-RateLimit-Limit"], Is.EqualTo("-1")); | |
43 | + Assert.That(apiinfo.HttpHeaders["X-RateLimit-Reset"], Is.EqualTo("-1")); | |
44 | + | |
45 | + Assert.That(apiinfo.HttpHeaders["X-Access-Level"], Is.EqualTo("read-write-directmessages")); | |
46 | + | |
47 | + Assert.That(apiinfo.HttpHeaders["X-MediaRateLimit-Remaining"], Is.EqualTo("-1")); | |
48 | + Assert.That(apiinfo.HttpHeaders["X-MediaRateLimit-Limit"], Is.EqualTo("-1")); | |
49 | + Assert.That(apiinfo.HttpHeaders["X-MediaRateLimit-Reset"], Is.EqualTo("-1")); | |
50 | + | |
51 | + | |
52 | + } | |
53 | + | |
54 | + [Test] | |
55 | + [Combinatorial] | |
56 | + public void Test_MaxCount([Values(100, 0, -100)]int value) | |
57 | + { | |
58 | + ApiInformation apiinfo = new ApiInformation(); | |
59 | + apiinfo.MaxCount = value; | |
60 | + Assert.That(apiinfo.MaxCount, Is.EqualTo(value)); | |
61 | + } | |
62 | + | |
63 | + | |
64 | + [TestCase(-100, Result = -100)] | |
65 | + [TestCase(0, Result = 0)] | |
66 | + [TestCase(100, Result = 100)] | |
67 | + [TestCase(int.MaxValue, Result = int.MaxValue)] | |
68 | + [TestCase(int.MinValue, Result = int.MinValue)] | |
69 | + public int Test_RemainCount(int value) | |
70 | + { | |
71 | + ApiInformation apiinfo = new ApiInformation(); | |
72 | + apiinfo.RemainCount = value; | |
73 | + return apiinfo.RemainCount; | |
74 | + } | |
75 | + | |
76 | + | |
77 | + | |
78 | + | |
79 | + | |
80 | + [TestCase(-100, Result = -100)] | |
81 | + [TestCase(0, Result = 0)] | |
82 | + [TestCase(100, Result = 100)] | |
83 | + [TestCase(int.MaxValue, Result = int.MaxValue)] | |
84 | + [TestCase(int.MinValue, Result = int.MinValue)] | |
85 | + public int Test_MediaMaxCount(int value) | |
86 | + { | |
87 | + ApiInformation apiinfo = new ApiInformation(); | |
88 | + apiinfo.MediaMaxCount = value; | |
89 | + return apiinfo.MediaMaxCount; | |
90 | + } | |
91 | + | |
92 | + [TestCase(-100, Result = -100)] | |
93 | + [TestCase(0, Result = 0)] | |
94 | + [TestCase(100, Result = 100)] | |
95 | + [TestCase(int.MaxValue, Result = int.MaxValue)] | |
96 | + [TestCase(int.MinValue, Result = int.MinValue)] | |
97 | + public int Test_ResetTimeInSeconds(int value) | |
98 | + { | |
99 | + ApiInformation apiinfo = new ApiInformation(); | |
100 | + apiinfo.ResetTimeInSeconds = value; | |
101 | + return apiinfo.ResetTimeInSeconds; | |
102 | + } | |
103 | + | |
104 | + [TestCase(-100, Result = -100)] | |
105 | + [TestCase(0, Result = 0)] | |
106 | + [TestCase(100, Result = 100)] | |
107 | + [TestCase(int.MaxValue, Result = int.MaxValue)] | |
108 | + [TestCase(int.MinValue, Result = int.MinValue)] | |
109 | + public int Test_UsingCount(int value) | |
110 | + { | |
111 | + ApiInformation apiinfo = new ApiInformation(); | |
112 | + apiinfo.UsingCount = value; | |
113 | + return apiinfo.UsingCount; | |
114 | + } | |
115 | + | |
116 | + //↓以下DateTime系 | |
117 | + | |
118 | + [Test] | |
119 | + public void Test_ConvertResetTimeInSecondsToResetTime() | |
120 | + { | |
121 | + ApiInformation apiinfo = new ApiInformation(); | |
122 | + DateTime d = apiinfo.ConvertResetTimeInSecondsToResetTime(-1); | |
123 | + Assert.That(d, Is.EqualTo(new DateTime())); | |
124 | + } | |
125 | + | |
126 | + [Test] | |
127 | + public void Test_MediaResetTime() | |
128 | + { | |
129 | + ApiInformation apiinfo = new ApiInformation(); | |
130 | + DateTime d = new DateTime(1970, 1, 1, 0, 0, 0); | |
131 | + apiinfo.MediaResetTime = d; | |
132 | + Assert.That(apiinfo.MediaResetTime, Is.EqualTo(d)); | |
133 | + } | |
134 | + | |
135 | + | |
136 | + } | |
137 | +} |
@@ -1,199 +1,199 @@ | ||
1 | -// OpenTween - Client of Twitter | |
2 | -// Copyright (c) 2012 the40san <http://sourceforge.jp/users/the40san/> | |
3 | -// All rights reserved. | |
4 | -// | |
5 | -// This file is part of OpenTween. | |
6 | -// | |
7 | -// This program is free software; you can redistribute it and/or modify it | |
8 | -// under the terms of the GNU General public License as published by the Free | |
9 | -// Software Foundation; either version 3 of the License, or (at your option) | |
10 | -// any later version. | |
11 | -// | |
12 | -// This program is distributed in the hope that it will be useful, but | |
13 | -// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
14 | -// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General public License | |
15 | -// for more details. | |
16 | -// | |
17 | -// You should have received a copy of the GNU General public License along | |
18 | -// with this program. If not, see <http://www.gnu.org/licenses/>, or write to | |
19 | -// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, | |
20 | -// Boston, MA 02110-1301, USA.using System; | |
21 | -using System.Collections.Generic; | |
22 | -using System.Linq; | |
23 | -using System.Text; | |
24 | -using System.Reflection; | |
25 | -using NUnit.Framework; | |
26 | - | |
27 | - | |
28 | -namespace OpenTween | |
29 | -{ | |
30 | - /// <summary> | |
31 | - /// Bingクラスのテストクラス | |
32 | - /// Translate(string _from, string _to, string _text, out string buf)のテスト未実装です | |
33 | - /// </summary> | |
34 | - [TestFixture] | |
35 | - class BingTest | |
36 | - { | |
37 | - List<string> LanguageTable; | |
38 | - Bing bing; | |
39 | - | |
40 | - [TestFixtureSetUp] | |
41 | - public void TestInit() | |
42 | - { | |
43 | - bing = new Bing(); | |
44 | - //リフレクション使ってインスタンスから取得するようにしたい | |
45 | - #region 言語テーブル定義 | |
46 | - LanguageTable = new List<string>() { | |
47 | - "af", | |
48 | - "sq", | |
49 | - "ar-sa", | |
50 | - "ar-iq", | |
51 | - "ar-eg", | |
52 | - "ar-ly", | |
53 | - "ar-dz", | |
54 | - "ar-ma", | |
55 | - "ar-tn", | |
56 | - "ar-om", | |
57 | - "ar-ye", | |
58 | - "ar-sy", | |
59 | - "ar-jo", | |
60 | - "ar-lb", | |
61 | - "ar-kw", | |
62 | - "ar-ae", | |
63 | - "ar-bh", | |
64 | - "ar-qa", | |
65 | - "eu", | |
66 | - "bg", | |
67 | - "be", | |
68 | - "ca", | |
69 | - "zh-tw", | |
70 | - "zh-cn", | |
71 | - "zh-hk", | |
72 | - "zh-sg", | |
73 | - "hr", | |
74 | - "cs", | |
75 | - "da", | |
76 | - "nl", | |
77 | - "nl-be", | |
78 | - "en", | |
79 | - "en-us", | |
80 | - "en-gb", | |
81 | - "en-au", | |
82 | - "en-ca", | |
83 | - "en-nz", | |
84 | - "en-ie", | |
85 | - "en-za", | |
86 | - "en-jm", | |
87 | - "en", | |
88 | - "en-bz", | |
89 | - "en-tt", | |
90 | - "et", | |
91 | - "fo", | |
92 | - "fa", | |
93 | - "fi", | |
94 | - "fr", | |
95 | - "fr-be", | |
96 | - "fr-ca", | |
97 | - "fr-ch", | |
98 | - "fr-lu", | |
99 | - "gd", | |
100 | - "ga", | |
101 | - "de", | |
102 | - "de-ch", | |
103 | - "de-at", | |
104 | - "de-lu", | |
105 | - "de-li", | |
106 | - "el", | |
107 | - "he", | |
108 | - "hi", | |
109 | - "hu", | |
110 | - "is", | |
111 | - "id", | |
112 | - "it", | |
113 | - "it-ch", | |
114 | - "ja", | |
115 | - "ko", | |
116 | - "ko", | |
117 | - "lv", | |
118 | - "lt", | |
119 | - "mk", | |
120 | - "ms", | |
121 | - "mt", | |
122 | - "no", | |
123 | - "no", | |
124 | - "pl", | |
125 | - "pt-br", | |
126 | - "pt", | |
127 | - "rm", | |
128 | - "ro", | |
129 | - "ro-mo", | |
130 | - "ru", | |
131 | - "ru-mo", | |
132 | - "sz", | |
133 | - "sr", | |
134 | - "sr", | |
135 | - "sk", | |
136 | - "sl", | |
137 | - "sb", | |
138 | - "es", | |
139 | - "es-mx", | |
140 | - "es-gt", | |
141 | - "es-cr", | |
142 | - "es-pa", | |
143 | - "es-do", | |
144 | - "es-ve", | |
145 | - "es-co", | |
146 | - "es-pe", | |
147 | - "es-ar", | |
148 | - "es-ec", | |
149 | - "es-cl", | |
150 | - "es-uy", | |
151 | - "es-py", | |
152 | - "es-bo", | |
153 | - "es-sv", | |
154 | - "es-hn", | |
155 | - "es-ni", | |
156 | - "es-pr", | |
157 | - "sx", | |
158 | - "sv", | |
159 | - "sv-fi", | |
160 | - "th", | |
161 | - "ts", | |
162 | - "tn", | |
163 | - "tr", | |
164 | - "uk", | |
165 | - "ur", | |
166 | - "ve", | |
167 | - "vi", | |
168 | - "xh", | |
169 | - "ji", | |
170 | - "zu" | |
171 | - }; | |
172 | - #endregion | |
173 | - | |
174 | - } | |
175 | - | |
176 | - //public bool TranslateTest(string _from, string _to, string _text, out string buf) | |
177 | - //{ | |
178 | - | |
179 | - //} | |
180 | - | |
181 | - [Test] | |
182 | - public void GetLanguageEnumFromIndexTest() | |
183 | - { | |
184 | - Assert.That(bing.GetLanguageEnumFromIndex(0), Is.EqualTo(LanguageTable[0])); | |
185 | - Assert.That(bing.GetLanguageEnumFromIndex(1), Is.EqualTo(LanguageTable[1])); | |
186 | - Assert.That(bing.GetLanguageEnumFromIndex(LanguageTable.Count - 1), Is.EqualTo(LanguageTable[LanguageTable.Count - 1])); | |
187 | - } | |
188 | - | |
189 | - [Test] | |
190 | - public void GetIndexFromLanguageEnumTest() | |
191 | - { | |
192 | - Assert.That(bing.GetIndexFromLanguageEnum(LanguageTable[0]), Is.EqualTo(0)); | |
193 | - Assert.That(bing.GetIndexFromLanguageEnum(LanguageTable[1]), Is.EqualTo(1)); | |
194 | - Assert.That(bing.GetIndexFromLanguageEnum(LanguageTable[LanguageTable.Count - 1]), Is.EqualTo(LanguageTable.Count - 1)); | |
195 | - } | |
196 | - | |
197 | - | |
198 | - } | |
199 | -} | |
1 | +// OpenTween - Client of Twitter | |
2 | +// Copyright (c) 2012 the40san <http://sourceforge.jp/users/the40san/> | |
3 | +// All rights reserved. | |
4 | +// | |
5 | +// This file is part of OpenTween. | |
6 | +// | |
7 | +// This program is free software; you can redistribute it and/or modify it | |
8 | +// under the terms of the GNU General public License as published by the Free | |
9 | +// Software Foundation; either version 3 of the License, or (at your option) | |
10 | +// any later version. | |
11 | +// | |
12 | +// This program is distributed in the hope that it will be useful, but | |
13 | +// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
14 | +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General public License | |
15 | +// for more details. | |
16 | +// | |
17 | +// You should have received a copy of the GNU General public License along | |
18 | +// with this program. If not, see <http://www.gnu.org/licenses/>, or write to | |
19 | +// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, | |
20 | +// Boston, MA 02110-1301, USA.using System; | |
21 | +using System.Collections.Generic; | |
22 | +using System.Linq; | |
23 | +using System.Text; | |
24 | +using System.Reflection; | |
25 | +using NUnit.Framework; | |
26 | + | |
27 | + | |
28 | +namespace OpenTween | |
29 | +{ | |
30 | + /// <summary> | |
31 | + /// Bingクラスのテストクラス | |
32 | + /// Translate(string _from, string _to, string _text, out string buf)のテスト未実装です | |
33 | + /// </summary> | |
34 | + [TestFixture] | |
35 | + class BingTest | |
36 | + { | |
37 | + List<string> LanguageTable; | |
38 | + Bing bing; | |
39 | + | |
40 | + [TestFixtureSetUp] | |
41 | + public void TestInit() | |
42 | + { | |
43 | + bing = new Bing(); | |
44 | + //リフレクション使ってインスタンスから取得するようにしたい | |
45 | + #region 言語テーブル定義 | |
46 | + LanguageTable = new List<string>() { | |
47 | + "af", | |
48 | + "sq", | |
49 | + "ar-sa", | |
50 | + "ar-iq", | |
51 | + "ar-eg", | |
52 | + "ar-ly", | |
53 | + "ar-dz", | |
54 | + "ar-ma", | |
55 | + "ar-tn", | |
56 | + "ar-om", | |
57 | + "ar-ye", | |
58 | + "ar-sy", | |
59 | + "ar-jo", | |
60 | + "ar-lb", | |
61 | + "ar-kw", | |
62 | + "ar-ae", | |
63 | + "ar-bh", | |
64 | + "ar-qa", | |
65 | + "eu", | |
66 | + "bg", | |
67 | + "be", | |
68 | + "ca", | |
69 | + "zh-tw", | |
70 | + "zh-cn", | |
71 | + "zh-hk", | |
72 | + "zh-sg", | |
73 | + "hr", | |
74 | + "cs", | |
75 | + "da", | |
76 | + "nl", | |
77 | + "nl-be", | |
78 | + "en", | |
79 | + "en-us", | |
80 | + "en-gb", | |
81 | + "en-au", | |
82 | + "en-ca", | |
83 | + "en-nz", | |
84 | + "en-ie", | |
85 | + "en-za", | |
86 | + "en-jm", | |
87 | + "en", | |
88 | + "en-bz", | |
89 | + "en-tt", | |
90 | + "et", | |
91 | + "fo", | |
92 | + "fa", | |
93 | + "fi", | |
94 | + "fr", | |
95 | + "fr-be", | |
96 | + "fr-ca", | |
97 | + "fr-ch", | |
98 | + "fr-lu", | |
99 | + "gd", | |
100 | + "ga", | |
101 | + "de", | |
102 | + "de-ch", | |
103 | + "de-at", | |
104 | + "de-lu", | |
105 | + "de-li", | |
106 | + "el", | |
107 | + "he", | |
108 | + "hi", | |
109 | + "hu", | |
110 | + "is", | |
111 | + "id", | |
112 | + "it", | |
113 | + "it-ch", | |
114 | + "ja", | |
115 | + "ko", | |
116 | + "ko", | |
117 | + "lv", | |
118 | + "lt", | |
119 | + "mk", | |
120 | + "ms", | |
121 | + "mt", | |
122 | + "no", | |
123 | + "no", | |
124 | + "pl", | |
125 | + "pt-br", | |
126 | + "pt", | |
127 | + "rm", | |
128 | + "ro", | |
129 | + "ro-mo", | |
130 | + "ru", | |
131 | + "ru-mo", | |
132 | + "sz", | |
133 | + "sr", | |
134 | + "sr", | |
135 | + "sk", | |
136 | + "sl", | |
137 | + "sb", | |
138 | + "es", | |
139 | + "es-mx", | |
140 | + "es-gt", | |
141 | + "es-cr", | |
142 | + "es-pa", | |
143 | + "es-do", | |
144 | + "es-ve", | |
145 | + "es-co", | |
146 | + "es-pe", | |
147 | + "es-ar", | |
148 | + "es-ec", | |
149 | + "es-cl", | |
150 | + "es-uy", | |
151 | + "es-py", | |
152 | + "es-bo", | |
153 | + "es-sv", | |
154 | + "es-hn", | |
155 | + "es-ni", | |
156 | + "es-pr", | |
157 | + "sx", | |
158 | + "sv", | |
159 | + "sv-fi", | |
160 | + "th", | |
161 | + "ts", | |
162 | + "tn", | |
163 | + "tr", | |
164 | + "uk", | |
165 | + "ur", | |
166 | + "ve", | |
167 | + "vi", | |
168 | + "xh", | |
169 | + "ji", | |
170 | + "zu" | |
171 | + }; | |
172 | + #endregion | |
173 | + | |
174 | + } | |
175 | + | |
176 | + //public bool TranslateTest(string _from, string _to, string _text, out string buf) | |
177 | + //{ | |
178 | + | |
179 | + //} | |
180 | + | |
181 | + [Test] | |
182 | + public void GetLanguageEnumFromIndexTest() | |
183 | + { | |
184 | + Assert.That(bing.GetLanguageEnumFromIndex(0), Is.EqualTo(LanguageTable[0])); | |
185 | + Assert.That(bing.GetLanguageEnumFromIndex(1), Is.EqualTo(LanguageTable[1])); | |
186 | + Assert.That(bing.GetLanguageEnumFromIndex(LanguageTable.Count - 1), Is.EqualTo(LanguageTable[LanguageTable.Count - 1])); | |
187 | + } | |
188 | + | |
189 | + [Test] | |
190 | + public void GetIndexFromLanguageEnumTest() | |
191 | + { | |
192 | + Assert.That(bing.GetIndexFromLanguageEnum(LanguageTable[0]), Is.EqualTo(0)); | |
193 | + Assert.That(bing.GetIndexFromLanguageEnum(LanguageTable[1]), Is.EqualTo(1)); | |
194 | + Assert.That(bing.GetIndexFromLanguageEnum(LanguageTable[LanguageTable.Count - 1]), Is.EqualTo(LanguageTable.Count - 1)); | |
195 | + } | |
196 | + | |
197 | + | |
198 | + } | |
199 | +} |
@@ -1,96 +1,96 @@ | ||
1 | -<?xml version="1.0" encoding="utf-8"?> | |
2 | -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
3 | - <PropertyGroup> | |
4 | - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
5 | - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
6 | - <ProductVersion>8.0.30703</ProductVersion> | |
7 | - <SchemaVersion>2.0</SchemaVersion> | |
8 | - <ProjectGuid>{18A32642-A8F3-425B-978D-0C6F630EDDE8}</ProjectGuid> | |
9 | - <OutputType>Library</OutputType> | |
10 | - <AppDesignerFolder>Properties</AppDesignerFolder> | |
11 | - <RootNamespace>OpenTween</RootNamespace> | |
12 | - <AssemblyName>OpenTween.Tests</AssemblyName> | |
13 | - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | |
14 | - <FileAlignment>512</FileAlignment> | |
15 | - </PropertyGroup> | |
16 | - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
17 | - <DebugSymbols>true</DebugSymbols> | |
18 | - <DebugType>full</DebugType> | |
19 | - <Optimize>false</Optimize> | |
20 | - <OutputPath>bin\Debug\</OutputPath> | |
21 | - <DefineConstants>DEBUG;TRACE</DefineConstants> | |
22 | - <ErrorReport>prompt</ErrorReport> | |
23 | - <WarningLevel>4</WarningLevel> | |
24 | - </PropertyGroup> | |
25 | - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
26 | - <DebugType>pdbonly</DebugType> | |
27 | - <Optimize>true</Optimize> | |
28 | - <OutputPath>bin\Release\</OutputPath> | |
29 | - <DefineConstants>TRACE</DefineConstants> | |
30 | - <ErrorReport>prompt</ErrorReport> | |
31 | - <WarningLevel>4</WarningLevel> | |
32 | - </PropertyGroup> | |
33 | - <ItemGroup> | |
34 | - <Reference Include="NSubstitute, Version=1.4.3.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL"> | |
35 | - <SpecificVersion>False</SpecificVersion> | |
36 | - <HintPath>dlls\NSubstitute.dll</HintPath> | |
37 | - </Reference> | |
38 | - <Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> | |
39 | - <SpecificVersion>False</SpecificVersion> | |
40 | - <HintPath>dlls\nunit.framework.dll</HintPath> | |
41 | - </Reference> | |
42 | - <Reference Include="System" /> | |
43 | - <Reference Include="System.Core" /> | |
44 | - <Reference Include="System.Runtime.Serialization" /> | |
45 | - <Reference Include="System.Windows.Forms" /> | |
46 | - <Reference Include="System.Xml.Linq" /> | |
47 | - <Reference Include="System.Data.DataSetExtensions" /> | |
48 | - <Reference Include="Microsoft.CSharp" /> | |
49 | - <Reference Include="System.Data" /> | |
50 | - <Reference Include="System.Xml" /> | |
51 | - </ItemGroup> | |
52 | - <ItemGroup> | |
53 | - <Compile Include="ApiInformationTest.cs" /> | |
54 | - <Compile Include="BingTest.cs" /> | |
55 | - <Compile Include="FoursquareTest.cs" /> | |
56 | - <Compile Include="LRUCacheDictionaryTest.cs" /> | |
57 | - <Compile Include="MyCommonTest.cs" /> | |
58 | - <Compile Include="PostClassTest.cs" /> | |
59 | - <Compile Include="Properties\AssemblyInfo.cs" /> | |
60 | - <Compile Include="TabsDialogTest.cs" /> | |
61 | - <Compile Include="TestUtils.cs" /> | |
62 | - <Compile Include="Thumbnail\Services\ImgAzyobuziNetTest.cs" /> | |
63 | - <Compile Include="Thumbnail\Services\MetaThumbnailServiceTest.cs" /> | |
64 | - <Compile Include="Thumbnail\Services\SimpleThumbnailServiceTest.cs" /> | |
65 | - <Compile Include="Thumbnail\Services\TinamiTest.cs" /> | |
66 | - <Compile Include="TweetThumbnailTest.cs" /> | |
67 | - </ItemGroup> | |
68 | - <ItemGroup> | |
69 | - <ProjectReference Include="..\OpenTween\OpenTween.csproj"> | |
70 | - <Project>{3D8995C7-BDF3-4273-9F9D-DDD902F6A101}</Project> | |
71 | - <Name>OpenTween</Name> | |
72 | - </ProjectReference> | |
73 | - </ItemGroup> | |
74 | - <ItemGroup> | |
75 | - <Content Include="dlls\NSubstitute.dll" /> | |
76 | - <Content Include="dlls\nunit.framework.dll" /> | |
77 | - <Content Include="Resources\re.gif"> | |
78 | - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
79 | - </Content> | |
80 | - <Content Include="Resources\re1.gif"> | |
81 | - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
82 | - </Content> | |
83 | - <Content Include="Resources\re1.png"> | |
84 | - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
85 | - </Content> | |
86 | - </ItemGroup> | |
87 | - <ItemGroup /> | |
88 | - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |
89 | - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |
90 | - Other similar extension points exist, see Microsoft.Common.targets. | |
91 | - <Target Name="BeforeBuild"> | |
92 | - </Target> | |
93 | - <Target Name="AfterBuild"> | |
94 | - </Target> | |
95 | - --> | |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
3 | + <PropertyGroup> | |
4 | + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
5 | + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
6 | + <ProductVersion>8.0.30703</ProductVersion> | |
7 | + <SchemaVersion>2.0</SchemaVersion> | |
8 | + <ProjectGuid>{18A32642-A8F3-425B-978D-0C6F630EDDE8}</ProjectGuid> | |
9 | + <OutputType>Library</OutputType> | |
10 | + <AppDesignerFolder>Properties</AppDesignerFolder> | |
11 | + <RootNamespace>OpenTween</RootNamespace> | |
12 | + <AssemblyName>OpenTween.Tests</AssemblyName> | |
13 | + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | |
14 | + <FileAlignment>512</FileAlignment> | |
15 | + </PropertyGroup> | |
16 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
17 | + <DebugSymbols>true</DebugSymbols> | |
18 | + <DebugType>full</DebugType> | |
19 | + <Optimize>false</Optimize> | |
20 | + <OutputPath>bin\Debug\</OutputPath> | |
21 | + <DefineConstants>DEBUG;TRACE</DefineConstants> | |
22 | + <ErrorReport>prompt</ErrorReport> | |
23 | + <WarningLevel>4</WarningLevel> | |
24 | + </PropertyGroup> | |
25 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
26 | + <DebugType>pdbonly</DebugType> | |
27 | + <Optimize>true</Optimize> | |
28 | + <OutputPath>bin\Release\</OutputPath> | |
29 | + <DefineConstants>TRACE</DefineConstants> | |
30 | + <ErrorReport>prompt</ErrorReport> | |
31 | + <WarningLevel>4</WarningLevel> | |
32 | + </PropertyGroup> | |
33 | + <ItemGroup> | |
34 | + <Reference Include="NSubstitute, Version=1.4.3.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL"> | |
35 | + <SpecificVersion>False</SpecificVersion> | |
36 | + <HintPath>dlls\NSubstitute.dll</HintPath> | |
37 | + </Reference> | |
38 | + <Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> | |
39 | + <SpecificVersion>False</SpecificVersion> | |
40 | + <HintPath>dlls\nunit.framework.dll</HintPath> | |
41 | + </Reference> | |
42 | + <Reference Include="System" /> | |
43 | + <Reference Include="System.Core" /> | |
44 | + <Reference Include="System.Runtime.Serialization" /> | |
45 | + <Reference Include="System.Windows.Forms" /> | |
46 | + <Reference Include="System.Xml.Linq" /> | |
47 | + <Reference Include="System.Data.DataSetExtensions" /> | |
48 | + <Reference Include="Microsoft.CSharp" /> | |
49 | + <Reference Include="System.Data" /> | |
50 | + <Reference Include="System.Xml" /> | |
51 | + </ItemGroup> | |
52 | + <ItemGroup> | |
53 | + <Compile Include="ApiInformationTest.cs" /> | |
54 | + <Compile Include="BingTest.cs" /> | |
55 | + <Compile Include="FoursquareTest.cs" /> | |
56 | + <Compile Include="LRUCacheDictionaryTest.cs" /> | |
57 | + <Compile Include="MyCommonTest.cs" /> | |
58 | + <Compile Include="PostClassTest.cs" /> | |
59 | + <Compile Include="Properties\AssemblyInfo.cs" /> | |
60 | + <Compile Include="TabsDialogTest.cs" /> | |
61 | + <Compile Include="TestUtils.cs" /> | |
62 | + <Compile Include="Thumbnail\Services\ImgAzyobuziNetTest.cs" /> | |
63 | + <Compile Include="Thumbnail\Services\MetaThumbnailServiceTest.cs" /> | |
64 | + <Compile Include="Thumbnail\Services\SimpleThumbnailServiceTest.cs" /> | |
65 | + <Compile Include="Thumbnail\Services\TinamiTest.cs" /> | |
66 | + <Compile Include="TweetThumbnailTest.cs" /> | |
67 | + </ItemGroup> | |
68 | + <ItemGroup> | |
69 | + <ProjectReference Include="..\OpenTween\OpenTween.csproj"> | |
70 | + <Project>{3D8995C7-BDF3-4273-9F9D-DDD902F6A101}</Project> | |
71 | + <Name>OpenTween</Name> | |
72 | + </ProjectReference> | |
73 | + </ItemGroup> | |
74 | + <ItemGroup> | |
75 | + <Content Include="dlls\NSubstitute.dll" /> | |
76 | + <Content Include="dlls\nunit.framework.dll" /> | |
77 | + <Content Include="Resources\re.gif"> | |
78 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
79 | + </Content> | |
80 | + <Content Include="Resources\re1.gif"> | |
81 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
82 | + </Content> | |
83 | + <Content Include="Resources\re1.png"> | |
84 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
85 | + </Content> | |
86 | + </ItemGroup> | |
87 | + <ItemGroup /> | |
88 | + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |
89 | + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |
90 | + Other similar extension points exist, see Microsoft.Common.targets. | |
91 | + <Target Name="BeforeBuild"> | |
92 | + </Target> | |
93 | + <Target Name="AfterBuild"> | |
94 | + </Target> | |
95 | + --> | |
96 | 96 | </Project> |
\ No newline at end of file |