diff --git a/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems b/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems index 6bf123fa9..bfbf3889a 100644 --- a/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems +++ b/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems @@ -100,7 +100,6 @@ - diff --git a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionRecoverySpecs.cs b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionRecoverySpecs.cs index 5bc12633d..85bd05aa1 100644 --- a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionRecoverySpecs.cs +++ b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionRecoverySpecs.cs @@ -65,6 +65,27 @@ public async Task DeprecatedRecoveryKeyProperty_ShouldBehaveSameAsCreateRecovery client.Connection.RecoveryKey.Should().Be(expectedRecoveryKey); } + [Fact] + [Trait("spec", "RTN16i")] + [Trait("spec", "RTN16f")] + [Trait("spec", "RTN16j")] + public async Task RecoveryKey_MsgSerialShouldNotBeSentToAblyButShouldBeSetOnConnection() + { + var recoveryKey = + "{\"connectionKey\":\"uniqueKey\",\"msgSerial\":45,\"channelSerials\":{\"channel1\":\"1\",\"channel2\":\"2\",\"channel3\":\"3\"}}"; + FakeTransportFactory.InitialiseFakeTransport = + transport => transport.OnConnectChangeStateToConnected = false; + var client = GetClientWithFakeTransport(options => { options.Recover = recoveryKey; }); + + var transportParams = await client.ConnectionManager.CreateTransportParameters("https://realtime.ably.io"); + var paramsDict = transportParams.GetParams(); + paramsDict.ContainsKey("recover").Should().BeTrue(); + paramsDict["recover"].Should().Be("uniqueKey"); + paramsDict.ContainsKey("msg_serial").Should().BeFalse(); + await Task.Delay(2000); + client.Connection.MessageSerial.Should().Be(45); + } + public ConnectionRecoverySpecs(ITestOutputHelper output) : base(output) { diff --git a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionSpecs.cs b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionSpecs.cs deleted file mode 100644 index 9e4937037..000000000 --- a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionSpecs.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.IO; -using FluentAssertions; -using System.Threading.Tasks; -using Xunit; -using Xunit.Abstractions; - -namespace IO.Ably.Tests.Shared.Realtime.ConnectionSpecs -{ - public class ConnectionSpecs : AblyRealtimeSpecs - { - [Fact] - [Trait("spec", "RTN16i")] - [Trait("spec", "RTN16f")] - [Trait("spec", "RTN16j")] - public async Task RecoveryKey_MsgSerialShouldNotBeSentToAblyButShouldBeSetOnConnection() - { - var recoveryKey = - "{\"connectionKey\":\"uniqueKey\",\"msgSerial\":45,\"channelSerials\":{\"channel1\":\"1\",\"channel2\":\"2\",\"channel3\":\"3\"}}"; - FakeTransportFactory.InitialiseFakeTransport = - transport => transport.OnConnectChangeStateToConnected = false; - var client = GetClientWithFakeTransport(options => { options.Recover = recoveryKey; }); - - var transportParams = await client.ConnectionManager.CreateTransportParameters("https://realtime.ably.io"); - var paramsDict = transportParams.GetParams(); - paramsDict.ContainsKey("recover").Should().BeTrue(); - paramsDict["recover"].Should().Be("uniqueKey"); - paramsDict.ContainsKey("msg_serial").Should().BeFalse(); - await Task.Delay(2000); - client.Connection.MessageSerial.Should().Be(45); - } - - public ConnectionSpecs(ITestOutputHelper output) - : base(output) - { - } - } -}