public async Task Should_be_able_to_create_parameter() { await managementClient.CreateParameterAsync(new Parameter { Component = "federation-upstream", Name = "myfakefederationupstream1", Vhost = vhostName, Value = new { value = new { uri = $"amqp://{username}:{password}@{rabbitHostName}" } } }).ConfigureAwait(false); Assert.Contains(await managementClient.GetParametersAsync().ConfigureAwait(false), p => p.Name == "myfakefederationupstream1"); }
/// <summary> /// Get all parameters on the cluster /// </summary> /// <param name="source"></param> /// <param name="cancellationToken"></param> public static IReadOnlyList <Parameter> GetParameters( [NotNull] this IManagementClient source, CancellationToken cancellationToken = default ) { if (source == null) { throw new ArgumentNullException(nameof(source)); } return(source.GetParametersAsync(cancellationToken) .GetAwaiter() .GetResult()); }
public async Task Should_be_able_to_list_parameters() { var parameters = await managementClient.GetParametersAsync().ConfigureAwait(false); Assert.NotNull(parameters); }