Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug in JS and .NET clients where StateChanged events would be passed a copy of the new state in lieu of the old state.
- Loading branch information
Showing
9 changed files
with
53 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Scripts/jquery.signalR.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/Microsoft.AspNet.SignalR.Hosting.AspNet45.Samples/Scripts/jquery.signalR.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
tests/Microsoft.AspNet.SignalR.Tests/Client/ConnectionFacts.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using Microsoft.AspNet.SignalR.Client; | ||
using Xunit; | ||
|
||
namespace Microsoft.AspNet.SignalR.Tests | ||
{ | ||
public class ConnectionFacts : IDisposable | ||
{ | ||
[Fact] | ||
public void ConnectionStateChangedEventIsCalledWithAppropriateArguments() | ||
{ | ||
var connection = new Client.Connection("http://test"); | ||
|
||
connection.StateChanged += stateChange => | ||
{ | ||
Assert.Equal(ConnectionState.Disconnected, stateChange.OldState); | ||
Assert.Equal(ConnectionState.Connecting, stateChange.NewState); | ||
}; | ||
|
||
Assert.True(((Client.IConnection)connection).ChangeState(ConnectionState.Disconnected, ConnectionState.Connecting)); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
GC.Collect(); | ||
GC.WaitForPendingFinalizers(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters