Skip to content

Commit

Permalink
Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rosca-sabina authored and Sabina Rosca committed Mar 14, 2023
1 parent bd3b9eb commit 1750248
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 85 deletions.
2 changes: 0 additions & 2 deletions projects/RabbitMQ.Client/client/api/IRecordedConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 5,6 @@ namespace RabbitMQ.Client
#nullable enable
public interface IRecordedConsumer
{
IBasicConsumer Consumer { get; }

string ConsumerTag { get; }

string Queue { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 139,6 @@ public Action<IRecordedBinding, Exception, IConnection> BindingRecoveryException

/// <summary>
/// Retries, or otherwise handles, an exception thrown when attempting to recover a consumer.
/// Is only called when the exception did not cause the consumer's channel to close.
/// </summary>
public Action<IRecordedConsumer, Exception, IConnection> ConsumerRecoveryExceptionHandler
{
Expand Down
56 changes: 56 additions & 0 deletions projects/Unit/APIApproval.Approve.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 145,8 @@ namespace RabbitMQ.Client
public string Password { get; }
public System.TimeSpan RequestedConnectionTimeout { get; }
public bool TopologyRecoveryEnabled { get; }
public RabbitMQ.Client.TopologyRecoveryExceptionHandler TopologyRecoveryExceptionHandler { get; }
public RabbitMQ.Client.TopologyRecoveryFilter TopologyRecoveryFilter { get; }
public string UserName { get; }
public string VirtualHost { get; }
}
Expand Down Expand Up @@ -184,6 186,8 @@ namespace RabbitMQ.Client
public System.TimeSpan SocketWriteTimeout { get; set; }
public RabbitMQ.Client.SslOption Ssl { get; set; }
public bool TopologyRecoveryEnabled { get; set; }
public RabbitMQ.Client.TopologyRecoveryExceptionHandler TopologyRecoveryExceptionHandler { get; set; }
public RabbitMQ.Client.TopologyRecoveryFilter TopologyRecoveryFilter { get; set; }
public System.Uri Uri { get; set; }
public string UserName { get; set; }
public string VirtualHost { get; set; }
Expand Down Expand Up @@ -566,6 570,38 @@ namespace RabbitMQ.Client
bool IsTypePresent();
bool IsUserIdPresent();
}
public interface IRecordedBinding
{
System.Collections.Generic.IDictionary<string, object>? Arguments { get; }
string Destination { get; }
string RoutingKey { get; }
string Source { get; }
}
public interface IRecordedConsumer
{
System.Collections.Generic.IDictionary<string, object>? Arguments { get; }
bool AutoAck { get; }
string ConsumerTag { get; }
bool Exclusive { get; }
string Queue { get; }
}
public interface IRecordedExchange
{
System.Collections.Generic.IDictionary<string, object>? Arguments { get; }
bool AutoDelete { get; }
bool Durable { get; }
string Name { get; }
string Type { get; }
}
public interface IRecordedQueue
{
System.Collections.Generic.IDictionary<string, object>? Arguments { get; }
bool AutoDelete { get; }
bool Durable { get; }
bool Exclusive { get; }
bool IsServerNamed { get; }
string Name { get; }
}
public interface IRecoverable
{
event System.EventHandler<System.EventArgs> Recovery;
Expand Down Expand Up @@ -689,6 725,26 @@ namespace RabbitMQ.Client
public string ServerName { get; set; }
public System.Security.Authentication.SslProtocols Version { get; set; }
}
public class TopologyRecoveryExceptionHandler
{
public TopologyRecoveryExceptionHandler() { }
public System.Func<RabbitMQ.Client.IRecordedBinding, System.Exception, bool> BindingRecoveryExceptionCondition { get; set; }
public System.Action<RabbitMQ.Client.IRecordedBinding, System.Exception, RabbitMQ.Client.IConnection> BindingRecoveryExceptionHandler { get; set; }
public System.Func<RabbitMQ.Client.IRecordedConsumer, System.Exception, bool> ConsumerRecoveryExceptionCondition { get; set; }
public System.Action<RabbitMQ.Client.IRecordedConsumer, System.Exception, RabbitMQ.Client.IConnection> ConsumerRecoveryExceptionHandler { get; set; }
public System.Func<RabbitMQ.Client.IRecordedExchange, System.Exception, bool> ExchangeRecoveryExceptionCondition { get; set; }
public System.Action<RabbitMQ.Client.IRecordedExchange, System.Exception, RabbitMQ.Client.IConnection> ExchangeRecoveryExceptionHandler { get; set; }
public System.Func<RabbitMQ.Client.IRecordedQueue, System.Exception, bool> QueueRecoveryExceptionCondition { get; set; }
public System.Action<RabbitMQ.Client.IRecordedQueue, System.Exception, RabbitMQ.Client.IConnection> QueueRecoveryExceptionHandler { get; set; }
}
public class TopologyRecoveryFilter
{
public TopologyRecoveryFilter() { }
public System.Func<RabbitMQ.Client.IRecordedBinding, bool> BindingFilter { get; set; }
public System.Func<RabbitMQ.Client.IRecordedConsumer, bool> ConsumerFilter { get; set; }
public System.Func<RabbitMQ.Client.IRecordedExchange, bool> ExchangeFilter { get; set; }
public System.Func<RabbitMQ.Client.IRecordedQueue, bool> QueueFilter { get; set; }
}
}
namespace RabbitMQ.Client.Events
{
Expand Down
Loading

0 comments on commit 1750248

Please sign in to comment.