Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2017-03-29 19:58:35 +0300
committerMarek Safar <marek.safar@gmail.com>2017-03-30 14:24:56 +0300
commitdba0a9c56616a953bcf15b6851ab479887b6959a (patch)
tree852fae05808bca0f341021727cbcbaf16940a86d /mcs/class/System/Test
parentdd08fd4160ee549fc529bd1e819ffd3c54f62cd8 (diff)
[System] WebSockets from corefx
Diffstat (limited to 'mcs/class/System/Test')
-rw-r--r--mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs
index b19688cf44c..a9a82f94a8d 100644
--- a/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs
+++ b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs
@@ -57,7 +57,7 @@ namespace MonoTests.System.Net.WebSockets
}
[Test]
- [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
+ [Category ("NotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
public void ServerHandshakeReturnCrapStatusCodeTest ()
{
// On purpose,
@@ -149,7 +149,7 @@ namespace MonoTests.System.Net.WebSockets
Assert.AreEqual (WebSocketState.CloseSent, socket.State);
var resp = socket.ReceiveAsync (new ArraySegment<byte> (new byte[0]), CancellationToken.None).Result;
- Assert.AreEqual (WebSocketState.Closed, socket.State);
+ Assert.AreEqual (WebSocketState.CloseReceived, socket.State);
Assert.AreEqual (WebSocketMessageType.Close, resp.MessageType);
Assert.AreEqual (WebSocketCloseStatus.NormalClosure, resp.CloseStatus);
Assert.AreEqual (string.Empty, resp.CloseStatusDescription);
@@ -211,7 +211,7 @@ namespace MonoTests.System.Net.WebSockets
Assert.IsTrue (socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait (5000));
Assert.IsTrue (socket.ReceiveAsync (new ArraySegment<byte> (new byte[0]), CancellationToken.None).Wait (5000));
} catch (AggregateException e) {
- AssertWebSocketException (e, WebSocketError.Success);
+ AssertWebSocketException (e, WebSocketError.InvalidState);
return;
}
Assert.Fail ("Should have thrown");
@@ -226,7 +226,7 @@ namespace MonoTests.System.Net.WebSockets
Assert.IsTrue (socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait (5000));
Assert.IsTrue (socket.SendAsync (new ArraySegment<byte> (new byte[0]), WebSocketMessageType.Text, true, CancellationToken.None).Wait (5000));
} catch (AggregateException e) {
- AssertWebSocketException (e, WebSocketError.Success);
+ AssertWebSocketException (e, WebSocketError.InvalidState);
return;
}
Assert.Fail ("Should have thrown");
@@ -241,7 +241,7 @@ namespace MonoTests.System.Net.WebSockets
Assert.IsTrue (socket.CloseOutputAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait (5000));
Assert.IsTrue (socket.SendAsync (new ArraySegment<byte> (new byte[0]), WebSocketMessageType.Text, true, CancellationToken.None).Wait (5000));
} catch (AggregateException e) {
- AssertWebSocketException (e, WebSocketError.Success);
+ AssertWebSocketException (e, WebSocketError.InvalidState);
return;
}
Assert.Fail ("Should have thrown");
@@ -296,7 +296,6 @@ namespace MonoTests.System.Net.WebSockets
void AssertWebSocketException (AggregateException e, WebSocketError error, Type inner = null)
{
var wsEx = e.InnerException as WebSocketException;
- Console.WriteLine (e.InnerException.ToString ());
Assert.IsNotNull (wsEx, "Not a websocketexception");
Assert.AreEqual (error, wsEx.WebSocketErrorCode);
if (inner != null) {