public async Task Should_enable_tracing() { var vhost = await managementClient.GetVhostAsync(vhostName).ConfigureAwait(false); await managementClient.EnableTracingAsync(vhost).ConfigureAwait(false); var vhostAfterUpdate = await managementClient.GetVhostAsync(vhostName).ConfigureAwait(false); Assert.True(vhostAfterUpdate.Tracing); }
/// <summary> /// Enable tracing on given virtual host. /// </summary> /// <param name="source"></param> /// <param name="vhost">The virtual host on which to enable tracing</param> /// <param name="cancellationToken"></param> public static void EnableTracing( [NotNull] this IManagementClient source, [NotNull] Vhost vhost, CancellationToken cancellationToken = default ) { if (source == null) { throw new ArgumentNullException(nameof(source)); } source.EnableTracingAsync(vhost, cancellationToken) .GetAwaiter() .GetResult(); }