public async Task GetTransmissionStatusAsync_Succeeds()
        {
            // Arrange
            await InitializeDatabaseAsync();
            var provider = new SqlServerServiceBroker(connection);
            var handle = await BeginDialogAsync(encryption: true);
            await connection.ExecuteAsync("SEND ON CONVERSATION @handle;", new { handle });

            // Act
            var status = await provider.GetTransmissionStatusAsync(new GetTransmissionStatusArguments(handle));

            // Assert
            Assert.StartsWith("The session keys", status);
        }
        public async Task GetTransmissionStatusAsync_UsesTransaction()
        {
            // Arrange
            await InitializeDatabaseAsync();
            var provider = new SqlServerServiceBroker(connection);
            var handle = await BeginDialogAsync(encryption: true);

            // Act
            using (var transaction = await provider.BeginTransactionAsync())
            {
                await connection.ExecuteAsync("SEND ON CONVERSATION @handle;", new { handle }, transaction.UnderlyingTransaction);
                transaction.Rollback();
            }

            var status = await provider.GetTransmissionStatusAsync(new GetTransmissionStatusArguments(handle));

            // Assert
            Assert.Equal(string.Empty, status);
        }
        public async Task GetTransmissionStatusAsync_ArgumentsCannotBeNull()
        {
            // Arrange
            var provider = new SqlServerServiceBroker(connection);

            // Act
            Func<Task> call = async () => await provider.GetTransmissionStatusAsync(null);

            // Assert
            await Assert.ThrowsAsync<ArgumentNullException>("arguments", call);
        }