Adding roundtripping test for CancelInvocation message (#1031)
* Adding roundtripping test for CancelInvocation message
This commit is contained in:
parent
04d4da2987
commit
a903a74db1
|
|
@ -43,6 +43,8 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol
|
||||||
new object[] { new[] { new StreamItemMessage("xyz", new CustomObject()) } },
|
new object[] { new[] { new StreamItemMessage("xyz", new CustomObject()) } },
|
||||||
new object[] { new[] { new StreamItemMessage("xyz", new[] { new CustomObject(), new CustomObject() }) } },
|
new object[] { new[] { new StreamItemMessage("xyz", new[] { new CustomObject(), new CustomObject() }) } },
|
||||||
|
|
||||||
|
new object[] { new[] { new CancelInvocationMessage("xyz") } },
|
||||||
|
|
||||||
new object[]
|
new object[]
|
||||||
{
|
{
|
||||||
new HubMessage[]
|
new HubMessage[]
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return InvocationMessagesEqual(x, y) || StreamItemMessagesEqual(x, y) || CompletionMessagesEqual(x, y);
|
return InvocationMessagesEqual(x, y) || StreamItemMessagesEqual(x, y) || CompletionMessagesEqual(x, y) || CancelInvocationMessagesEqual(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CompletionMessagesEqual(HubMessage x, HubMessage y)
|
private bool CompletionMessagesEqual(HubMessage x, HubMessage y)
|
||||||
|
|
@ -47,6 +47,11 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol
|
||||||
left.NonBlocking == right.NonBlocking;
|
left.NonBlocking == right.NonBlocking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool CancelInvocationMessagesEqual(HubMessage x, HubMessage y)
|
||||||
|
{
|
||||||
|
return x is CancelInvocationMessage && y is CancelInvocationMessage;
|
||||||
|
}
|
||||||
|
|
||||||
private bool ArgumentListsEqual(object[] left, object[] right)
|
private bool ArgumentListsEqual(object[] left, object[] right)
|
||||||
{
|
{
|
||||||
if (left == right)
|
if (left == right)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue