@@ -18,7 +18,7 @@ public void TestLengthWith2Urls()
18
18
{
19
19
string test = "Hello http://tweetinvi.codeplex.com/salutLescopains 3615 Gerard www.linviIsMe.com piloupe" ;
20
20
21
- //int twitterLength = StringExtension.TweetLength (test);
21
+ //int twitterLength = StringExtension.EstimateTweetLength (test);
22
22
23
23
//Assert.AreEqual(twitterLength, 73);
24
24
}
@@ -29,7 +29,7 @@ public void TestLengthWith2UrlsAndHttps()
29
29
{
30
30
string test = "Hello https://tweetinvi.codeplex.com/salutLescopains 3615 Gerard www.linviIsMe.com piloupe" ;
31
31
32
- //int twitterLength = StringExtension.TweetLength (test);
32
+ //int twitterLength = StringExtension.EstimateTweetLength (test);
33
33
34
34
//Assert.AreEqual(twitterLength, 73);
35
35
}
@@ -41,7 +41,7 @@ public void TestLengthWithURLFollowedByDotAndSingleChar()
41
41
{
42
42
string test = "Hello https://tweetinvi.codeplex.com.a 3615 Gerard www.linviIsMe.com piloupe" ;
43
43
44
- //int twitterLength = StringExtension.TweetLength (test);
44
+ //int twitterLength = StringExtension.EstimateTweetLength (test);
45
45
46
46
//Assert.AreEqual(twitterLength, 75);
47
47
}
@@ -52,7 +52,7 @@ public void TestLengthWithURLFollowedByDotAndTwoChars()
52
52
{
53
53
string test = "Hello https://tweetinvi.codeplex.com.au 3615 Gerard www.linviIsMe.com piloupe" ;
54
54
55
- //int twitterLength = StringExtension.TweetLength (test);
55
+ //int twitterLength = StringExtension.EstimateTweetLength (test);
56
56
57
57
//Assert.AreEqual(twitterLength, 73);
58
58
}
@@ -63,7 +63,7 @@ public void TestLengthWithURLFollowedByArgsAndDot()
63
63
{
64
64
string test = "Hello https://tweetinvi.codeplex.com/salutLescopains.a 3615 Gerard www.linviIsMe.com piloupe" ;
65
65
66
- //int twitterLength = StringExtension.TweetLength (test);
66
+ //int twitterLength = StringExtension.EstimateTweetLength (test);
67
67
68
68
//Assert.AreEqual(twitterLength, 73);
69
69
}
@@ -74,30 +74,30 @@ public void TestLengthWithSmallUrl()
74
74
{
75
75
string test = "www.co.co" ;
76
76
77
- //int twitterLength = StringExtension.TweetLength (test);
77
+ //int twitterLength = StringExtension.EstimateTweetLength (test);
78
78
79
79
//Assert.AreEqual(twitterLength, 23);
80
80
}
81
81
82
82
private void TestURLWithMultiplePrefix ( string url , int expectedLength )
83
83
{
84
84
//var basicTweetURL = string.Format("Hello there http:// {0} bye!", url);
85
- //Assert.AreEqual(basicTweetURL.TweetLength (), expectedLength);
85
+ //Assert.AreEqual(basicTweetURL.EstimateTweetLength (), expectedLength);
86
86
87
87
//var wwwTweetURL = string.Format("Hello there http:// www.{0} bye!", url);
88
- //Assert.AreEqual(wwwTweetURL.TweetLength (), expectedLength);
88
+ //Assert.AreEqual(wwwTweetURL.EstimateTweetLength (), expectedLength);
89
89
90
90
//var httpTweetURL = string.Format("Hello there http:// http://{0} bye!", url);
91
- //Assert.AreEqual(httpTweetURL.TweetLength (), expectedLength);
91
+ //Assert.AreEqual(httpTweetURL.EstimateTweetLength (), expectedLength);
92
92
93
93
//var httpsTweetURL = string.Format("Hello there http:// https://{0} bye!", url);
94
- //Assert.AreEqual(httpsTweetURL.TweetLength (), expectedLength);
94
+ //Assert.AreEqual(httpsTweetURL.EstimateTweetLength (), expectedLength);
95
95
96
96
//var httpwwwTweetURL = string.Format("Hello there http:// http://{0} bye!", url);
97
- //Assert.AreEqual(httpwwwTweetURL.TweetLength (), expectedLength);
97
+ //Assert.AreEqual(httpwwwTweetURL.EstimateTweetLength (), expectedLength);
98
98
99
99
//var httpswwwTweetURL = string.Format("Hello there http:// https://{0} bye!", url);
100
- //Assert.AreEqual(httpswwwTweetURL.TweetLength (), expectedLength);
100
+ //Assert.AreEqual(httpswwwTweetURL.EstimateTweetLength (), expectedLength);
101
101
}
102
102
103
103
[ TestMethod ]
@@ -151,41 +151,41 @@ public void URLWithOnly2CharsAtTheEnd()
151
151
152
152
//int expectedLength = 48;
153
153
//var basicTweetURL = string.Format("Hello there http:// {0} bye!", url);
154
- //Assert.AreEqual(basicTweetURL.TweetLength (), expectedLength);
154
+ //Assert.AreEqual(basicTweetURL.EstimateTweetLength (), expectedLength);
155
155
156
156
//var wwwTweetURL = string.Format("Hello there http:// www.{0} bye!", url);
157
- //Assert.AreEqual(wwwTweetURL.TweetLength (), expectedLength);
157
+ //Assert.AreEqual(wwwTweetURL.EstimateTweetLength (), expectedLength);
158
158
159
159
//var httpTweetURL = string.Format("Hello there http:// http://{0} bye!", url);
160
- //Assert.AreEqual(httpTweetURL.TweetLength (), expectedLength);
160
+ //Assert.AreEqual(httpTweetURL.EstimateTweetLength (), expectedLength);
161
161
162
162
//var httpsTweetURL = string.Format("Hello there http:// https://{0} bye!", url);
163
- //Assert.AreEqual(httpsTweetURL.TweetLength (), expectedLength);
163
+ //Assert.AreEqual(httpsTweetURL.EstimateTweetLength (), expectedLength);
164
164
165
165
//var httpwwwTweetURL = string.Format("Hello there http:// http://{0} bye!", url);
166
- //Assert.AreEqual(httpwwwTweetURL.TweetLength (), expectedLength);
166
+ //Assert.AreEqual(httpwwwTweetURL.EstimateTweetLength (), expectedLength);
167
167
168
168
//var httpswwwTweetURL = string.Format("Hello there http:// https://{0} bye!", url);
169
- //Assert.AreEqual(httpswwwTweetURL.TweetLength (), expectedLength);
169
+ //Assert.AreEqual(httpswwwTweetURL.EstimateTweetLength (), expectedLength);
170
170
}
171
171
172
172
[ TestMethod ]
173
173
[ Ignore ]
174
174
public void URLWithOnly2CharsAtTheEnd_ButWithASlashCharacter ( )
175
175
{
176
176
//var url = "NOW-FREE/4 Parties! Live Shows/Music/Art Walk Weekend. https://pbsc.co/eg/4b MAP, & interactive for every Smart/iphone: goo.gl/.";
177
- //Assert.AreEqual(url.TweetLength (), 146);
177
+ //Assert.AreEqual(url.EstimateTweetLength (), 146);
178
178
179
179
//var url2 = "NOW-FREE/4 Parties! Live Shows/Music/Art Walk Weekend. https://pbsc.co/eg/4b MAP, & interactive for every Smart/iphone: goo.gl/dqkd.";
180
- //Assert.AreEqual(url2.TweetLength (), 146);
180
+ //Assert.AreEqual(url2.EstimateTweetLength (), 146);
181
181
}
182
182
183
183
[ TestMethod ]
184
184
[ Ignore ]
185
185
public void URLWithEqualsCharacters ( )
186
186
{
187
187
//var message = "The quick brown fox jumps over the lazy dog. My dog is freaking amazing. https://www.google.nl/search?q=dog&source=lnms&tbm=isch&sa=X&ei=IZ7fU-CwJIO50QWtmICoCA&ved=0CAgQ_AUoAQ&biw=1528&bih=876";
188
- //Assert.AreEqual(message.TweetLength (), 96);
188
+ //Assert.AreEqual(message.EstimateTweetLength (), 96);
189
189
}
190
190
191
191
[ TestMethod ]
@@ -194,8 +194,8 @@ public void TweetWithURLAndMedia_URLHasNoSpaceBeforeIt()
194
194
{
195
195
var text = "abcdefghijklmnopqrstuvwxy abcdefghijklmnopqrstuvwxy abcdefghijklmnopqrstuvwxy abcdefghijklmophttp://bit.ly/tinyurlwiki" ;
196
196
197
- //Assert.AreEqual(Tweet.Length (text), 118);
198
- //Assert.AreEqual(Tweet.Length (text, new PublishTweetOptionalParameters()
197
+ //Assert.AreEqual(Tweet.EstimateTweetLength (text), 118);
198
+ //Assert.AreEqual(Tweet.EstimateTweetLength (text, new PublishTweetOptionalParameters()
199
199
//{
200
200
// MediaBinaries = new List<byte[]> { new byte[10] }
201
201
//}), 142);
@@ -208,8 +208,8 @@ public void TweetWithURLAndMedia()
208
208
{
209
209
var text = "abcdefghijklmnopqrstuvwxy abcdefghijklmnopqrstuvwxy abcdefghijklmnopqrstuvwxy abcdefghijklmop http://bit.ly/tinyurlwiki" ;
210
210
211
- //Assert.AreEqual(Tweet.Length (text), 117);
212
- //Assert.AreEqual(Tweet.Length (text, new PublishTweetOptionalParameters()
211
+ //Assert.AreEqual(Tweet.EstimateTweetLength (text), 117);
212
+ //Assert.AreEqual(Tweet.EstimateTweetLength (text, new PublishTweetOptionalParameters()
213
213
//{
214
214
// MediaBinaries = new List<byte[]> { new byte[10] }
215
215
//}), 141);
@@ -222,9 +222,9 @@ public void TweetWith2URLsAndMedia2()
222
222
var textOnly = "How Real Estate Agents Get More Closings By Using SMS Text Messaging - DialMyCalls.com" ;
223
223
var text = "How Real Estate Agents Get More Closings By Using SMS Text Messaging - DialMyCalls.com http://bit.ly/1kmezw9" ;
224
224
225
- //Assert.AreEqual(Tweet.Length (textOnly), 94);
226
- //Assert.AreEqual(Tweet.Length (text), 118);
227
- //Assert.AreEqual(Tweet.Length (text, new PublishTweetOptionalParameters()
225
+ //Assert.AreEqual(Tweet.EstimateTweetLength (textOnly), 94);
226
+ //Assert.AreEqual(Tweet.EstimateTweetLength (text), 118);
227
+ //Assert.AreEqual(Tweet.EstimateTweetLength (text, new PublishTweetOptionalParameters()
228
228
//{
229
229
// MediaBinaries = new List<byte[]> { new byte[10] }
230
230
//}), 142);
@@ -234,14 +234,14 @@ public void TweetWith2URLsAndMedia2()
234
234
[ Ignore ]
235
235
public void TweetWithUTF32Character ( )
236
236
{
237
- //Assert.AreEqual(6, Tweet.Length ("sa🚒osa"));
237
+ //Assert.AreEqual(6, Tweet.EstimateTweetLength ("sa🚒osa"));
238
238
}
239
239
240
240
[ TestMethod ]
241
241
[ Ignore ]
242
242
public void TweetLengthWithSpecialUTFCharacters ( )
243
243
{
244
- //var l = Tweet.Length ("sa 🎅⛄️🎅 done");
244
+ //var l = Tweet.EstimateTweetLength ("sa 🎅⛄️🎅 done");
245
245
//Assert.AreEqual(l, 11);
246
246
}
247
247
0 commit comments