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