Add unit tests for RabbitMq and Udp transport servers and clients
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
- Implemented comprehensive unit tests for RabbitMqTransportServer, covering constructor, disposal, connection management, event handlers, and exception handling. - Added configuration tests for RabbitMqTransportServer to validate SSL, durable queues, auto-recovery, and custom virtual host options. - Created unit tests for UdpFrameProtocol, including frame parsing and serialization, header size validation, and round-trip data preservation. - Developed tests for UdpTransportClient, focusing on connection handling, event subscriptions, and exception scenarios. - Established tests for UdpTransportServer, ensuring proper start/stop behavior, connection state management, and event handling. - Included tests for UdpTransportOptions to verify default values and modification capabilities. - Enhanced service registration tests for Udp transport services in the dependency injection container.
This commit is contained in:
@@ -52,4 +52,37 @@ internal static class DiagnosticDescriptors
|
||||
category: Category,
|
||||
defaultSeverity: DiagnosticSeverity.Info,
|
||||
isEnabledByDefault: false);
|
||||
|
||||
/// <summary>
|
||||
/// Schema generation failed for a type.
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor SchemaGenerationFailed = new(
|
||||
id: "STELLA005",
|
||||
title: "Schema generation failed",
|
||||
messageFormat: "Failed to generate JSON Schema for type '{0}' in endpoint '{1}'",
|
||||
category: Category,
|
||||
defaultSeverity: DiagnosticSeverity.Warning,
|
||||
isEnabledByDefault: true);
|
||||
|
||||
/// <summary>
|
||||
/// [ValidateSchema] applied to non-typed endpoint.
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor ValidateSchemaOnRawEndpoint = new(
|
||||
id: "STELLA006",
|
||||
title: "ValidateSchema on raw endpoint",
|
||||
messageFormat: "[ValidateSchema] on class '{0}' is ignored because it implements IRawStellaEndpoint",
|
||||
category: Category,
|
||||
defaultSeverity: DiagnosticSeverity.Warning,
|
||||
isEnabledByDefault: true);
|
||||
|
||||
/// <summary>
|
||||
/// External schema resource not found.
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor SchemaResourceNotFound = new(
|
||||
id: "STELLA007",
|
||||
title: "Schema resource not found",
|
||||
messageFormat: "External schema resource '{0}' not found for endpoint '{1}'",
|
||||
category: Category,
|
||||
defaultSeverity: DiagnosticSeverity.Warning,
|
||||
isEnabledByDefault: true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user