Commit graph

217 commits

Author SHA1 Message Date
salar2k
85fefb2d4e Implementing IsConnected 2017-04-23 21:37:51 +04:30
Ilya Pirozhenko
3acc6950ed Update README.md 2017-04-23 21:37:51 +04:30
Barsham Sotoudeh
7575d80b20 Add missing "offset" parameter in catch block of the GetFile method (#402)
This offset optional parameter was added in a753a1ab13
2017-04-23 21:37:51 +04:30
Ilya Pirozhenko
0546738056 Update README.md 2017-04-23 21:37:51 +04:30
Starli0n
474b337c70 Custom TCP hanlder to allow HTTP proxy auth 2017-04-23 21:37:51 +04:30
Starli0n
296456aa7c Add offset parameter to GetFile() method 2017-04-23 21:37:51 +04:30
Starli0n
06a8e3617e Add GetHistoryAsync() to TelegramClient 2017-04-23 21:37:51 +04:30
Mikhail
0727b29fa3 Search user by username with send message test. (#356)
* Search user by username with send message test.
2017-04-23 21:37:50 +04:30
salar2k
218de866cc Revert "Revert "Tests: Use OfType() instead of GetType() == typeof()""
This reverts commit 14c0c21bcf.
2017-04-23 21:37:50 +04:30
salar2k
8f2721a8b6 Revert "Tests: Use OfType() instead of GetType() == typeof()"
This reverts commit 31df61a479.
2017-04-23 21:37:50 +04:30
salar2k
750d0e4791 Implementing IsConnected 2017-04-23 21:37:50 +04:30
Ilya Pirozhenko
fa2c389956 Update README.md 2017-04-23 21:37:50 +04:30
Barsham Sotoudeh
5137c10aa1 Add missing "offset" parameter in catch block of the GetFile method (#402)
This offset optional parameter was added in a753a1ab13
2017-04-23 21:37:50 +04:30
Ilya Pirozhenko
a4a632f406 Update README.md 2017-04-23 21:37:50 +04:30
Starli0n
e58fa71567 Custom TCP hanlder to allow HTTP proxy auth 2017-04-23 21:37:42 +04:30
Starli0n
00b2616b03 Add offset parameter to GetFile() method 2017-04-23 21:37:42 +04:30
Starli0n
ebe71040c0 Add GetHistoryAsync() to TelegramClient 2017-04-23 21:37:41 +04:30
Mikhail
0d219a5885 Search user by username with send message test. (#356)
* Search user by username with send message test.
2017-04-23 21:37:27 +04:30
salar2k
64e329743e Revert "Revert "Tests: Use OfType() instead of GetType() == typeof()""
This reverts commit 14c0c21bcf.
2017-04-23 21:37:27 +04:30
salar2k
ae7af65346 Revert "Tests: Use OfType() instead of GetType() == typeof()"
This reverts commit 31df61a479.
2017-04-23 21:37:27 +04:30
salar2k
babcbc74af Implementing IsConnected 2017-04-23 21:37:27 +04:30
Ilya Pirozhenko
da0ef87586 Update README.md 2017-04-23 21:37:27 +04:30
Barsham Sotoudeh
6bbc18b967 Add missing "offset" parameter in catch block of the GetFile method (#402)
This offset optional parameter was added in a753a1ab13
2017-04-23 21:37:27 +04:30
Ilya Pirozhenko
8ab149960a Update README.md 2017-04-23 21:37:27 +04:30
Starli0n
25e9f9a401 Custom TCP hanlder to allow HTTP proxy auth 2017-04-23 21:37:27 +04:30
Starli0n
ce6bd5297b Add offset parameter to GetFile() method 2017-04-23 21:37:27 +04:30
Starli0n
f696abe61c Add GetHistoryAsync() to TelegramClient 2017-04-23 21:37:27 +04:30
Mikhail
cf70c44fe7 Search user by username with send message test. (#356)
* Search user by username with send message test.
2017-04-23 21:37:27 +04:30
salar2k
e75de99171 Revert "Revert "Tests: Use OfType() instead of GetType() == typeof()""
This reverts commit 14c0c21bcf.
2017-04-23 21:37:27 +04:30
salar2k
80773d6fe5 Revert "Tests: Use OfType() instead of GetType() == typeof()"
This reverts commit 31df61a479.
2017-04-23 21:37:27 +04:30
Salar Khalilzadeh
f39b81cf53 Tests: Use OfType() instead of GetType() == typeof() 2017-04-23 21:37:26 +04:30
Andres G. Aragoneses
6d73c0e964 Merge pull request #344 from salarcode/master
Implement IDisposable in TelegramClient class
2016-12-16 15:00:46 +08:00
salar2k
fc09dba71b Implementing IDisposable 2016-12-16 10:25:33 +03:30
Ilya Pirozhenko
3ef3ff86ad Merge pull request #323 from mykolasglinskis/master
FloodExceptionShouldNotCauseCannotReadPackageLengthError
2016-12-15 11:00:06 +03:00
Mykolas Glinskis
e191b59233 Tests: include testcase for "couldn't read packet length" bug
It seems that after triggering a FloodException, and waiting the required time
to be able to use Telegram again, TLSharp throws an exception. I include the
way to reproduce this bug as an [Ignore]d test with the hope that someone
may help me fix the problem soon.

For reference, the whole stacktrace of the exception was:

Test Name:	FloodExceptionShouldNotCauseCannotReadPackageLengthError
Test FullName:	TLSharp.Tests.TLSharpTestsVS.FloodExceptionShouldNotCauseCannotReadPackageLengthError
Test Source:	D:\Projects\GitHub\TLSharp\TLSharp.Tests.VS\TLSharpTestsVs.cs : line 72
Test Outcome:	Failed
Test Duration:	0:04:30.7467012

Result StackTrace:
at TLSharp.Core.Network.TcpTransport.<Receieve>d__4.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Core\Network\TcpTransport.cs:line 39
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at TLSharp.Core.Network.MtProtoSender.<Receive>d__9.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Core\Network\MtProtoSender.cs:line 139
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at TLSharp.Core.TelegramClient.<ConnectAsync>d__8.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Core\TelegramClient.cs:line 76
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at TLSharp.Tests.TLSharpTests.<CheckPhones>d__54.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Tests\TLSharpTests.cs:line 329
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at TLSharp.Tests.TLSharpTestsVS.<CheckPhones>d__9.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Tests.VS\TLSharpTestsVs.cs:line 68
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at TLSharp.Tests.TLSharpTests.<FloodExceptionShouldNotCauseCannotReadPackageLengthError>d__55.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Tests\TLSharpTests.cs:line 340
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at TLSharp.Tests.TLSharpTestsVS.<FloodExceptionShouldNotCauseCannotReadPackageLengthError>d__10.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Tests.VS\TLSharpTestsVs.cs:line 73
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Result Message:
Test method TLSharp.Tests.TLSharpTestsVS.FloodExceptionShouldNotCauseCannotReadPackageLengthError threw exception:
System.InvalidOperationException: Couldn't read the packet length
2016-11-30 09:34:44 +01:00
Ilya Pirozhenko
c22ee8dea6 Merge pull request #317 from unn4m3d/patch-1
Catch PhoneMigrationException in IsPhoneRegisteredAsync
2016-11-28 09:56:40 +03:00
unn4m3d
545e736808 Catch PhoneMigrationException in IsPhoneRegisteredAsync 2016-11-27 19:37:15 +10:00
Ilya Pirozhenko
6b3c96eaa6 Merge pull request #289 from knocte/nunitSupport
Tests: add NUnit support
2016-11-17 09:20:07 +03:00
Ilya Pirozhenko
ca6e18b50e Merge pull request #306 from aarani/cloud-password
Add Cloud password Support
2016-11-17 09:17:36 +03:00
Afshin Arani
6f9c328349 Add Cloud Password Support 2016-11-16 17:01:00 +03:30
Afshin Arani
7a6191871d Merge pull request #4 from sochix/master
Update to HEAD
2016-11-16 15:37:22 +03:30
Ilya Pirozhenko
61e2b1e732 Merge pull request #296 from knocte/md
Add C# style policy to SLN file
2016-11-09 09:17:51 +03:00
Andres G. Aragoneses
d6887a70f1 Tests: add NUnit support
What's an open source project that cannot be
tested in an open source platform? The best
open source .NET IDE that works in Linux
(MonoDevelop) doesn't have support for
VisualStudio Testing framework, but it has
support for NUnit.

By abstracting a bit the TLSharp.Tests assembly
we can have two different wrappers, one for
NUnit tests and other for VisualStudio tests,
so no one can be left behind.
2016-11-09 00:50:34 +08:00
Andres G. Aragoneses
cc0ca3bcd4 Add C# style policy to SLN file
This helps MonoDevelop know that the solution will default
to spaces instead of tabs, etc. This doesn't disrupt the
solution in VisualStudio at all.
2016-11-09 00:49:07 +08:00
Ilya Pirozhenko
ec48dede94 Merge pull request #294 from timocov/send_ping_method
Added possibility to do ping request (SendPingAsync method)
2016-11-08 15:37:01 +03:00
Eugene Timokhov
8b2f227142 Added possibility to do ping request (SendPingAsync method) 2016-11-07 02:40:19 +03:00
Ilya Pirozhenko
ca78532b34 Merge pull request #284 from knocte/normalizeSendMessageTest
SendNumberTest: remove the + from the phone number in app.config
2016-11-03 16:16:10 +03:00
Andres G. Aragoneses
adef68b747 SendNumberTest: remove the + from the phone number in app.config
NumberToAuthenticate works fine for the AuthTest if we put
a "+" before our international prefix when writing the number,
but because this test compares the numbers we got from the
Contacts List with the one in app.config, it could not find it
due to this prefix. Let's rather be prepared for that.
2016-11-03 01:33:56 +08:00
Andres G. Aragoneses
738a84937e SendMessageTest: rather crash with meaningful exception
Rather crash with meaningful exception than not passing the
test and only giving a hint when debugging.
2016-11-03 01:31:47 +08:00
Ilya Pirozhenko
8b04f82846 Merge pull request #283 from knocte/throwInsteadOfSleep
Throw FloodException instead of calling Thread.Sleep()
2016-11-01 21:05:14 +03:00