Skip to content

Commit

Permalink
Issue: #57
Browse files Browse the repository at this point in the history
Added unit tests to ensure if we send a message via IRC, the send events get fired.
  • Loading branch information
xforever1313 committed Nov 14, 2020
1 parent 3ba275a commit 0db3481
Show file tree
Hide file tree
Showing 2 changed files with 409 additions and 115 deletions.
6 changes: 3 additions & 3 deletions Chaskis/ChaskisCore/IrcConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class IrcConnection : IDisposable, IConnection, IChaskisEventScheduler, I
/// </summary>
private readonly INonDisposableStringParsingQueue parsingQueue;

private const string watchdogStr = "watchdog";
public static readonly string WatchdogStr = "watchdog";

private readonly IrcWatchdog watchDog;

Expand Down Expand Up @@ -147,7 +147,7 @@ public IrcConnection( IIrcConfig config, INonDisposableStringParsingQueue parsin
this.parsingQueue = parsingQueue;
this.watchDog = new IrcWatchdog(
StaticLogger.Log,
() => this.SendPing( watchdogStr ),
() => this.SendPing( WatchdogStr ),
this.Watchdog_OnFailure,
60 * 1000
);
Expand Down Expand Up @@ -503,7 +503,7 @@ public void SendPing( string msg )
/// <param name="response">The response from the server.</param>
public void ReceivedPong( string response )
{
if( response.EqualsIgnoreCase( watchdogStr ) )
if( response.EqualsIgnoreCase( WatchdogStr ) )
{
if ( this.watchDog.Started )
{
Expand Down
Loading

0 comments on commit 0db3481

Please sign in to comment.