public async Task SetApexCursorTest(KeyPair clientKeyPair, ConnectionState state, Type excpectedException) { Global.AppState.State = ApplicationState.Ready; var clientConnection = new AlphaWebSocketConnection(new FakeWebSocket(), "127.0.0.1") { ClientPubKey = clientKeyPair.PublicKey, ConnectionState = state }; var envelope = new SetApexCursor { Apex = 1 }.CreateEnvelope(); envelope.Sign(clientKeyPair); await AssertMessageHandling(clientConnection, envelope, excpectedException); }
public async Task SetApexCursorTest(KeyPair clientKeyPair, ConnectionState state, Type excpectedException) { context.AppState.State = ApplicationState.Ready; var clientConnection = new AlphaWebSocketConnection(context, new FakeWebSocket(), "127.0.0.1") { ClientPubKey = clientKeyPair.PublicKey, ConnectionState = state }; var envelope = new SetApexCursor { Apex = 1 }.CreateEnvelope(); envelope.Sign(clientKeyPair); using var writer = new XdrBufferWriter(); var inMessage = envelope.ToIncomingMessage(writer); await AssertMessageHandling(clientConnection, inMessage, excpectedException); }
internal void ResetApexCursor(SetApexCursor message) { ResetApexCursor(message.Apex); }