diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Apache/Kafka/KafkaCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Apache/Kafka/KafkaCheckTests.cs index 58d31aa..e5b9877 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Apache/Kafka/KafkaCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Apache/Kafka/KafkaCheckTests.cs @@ -67,10 +67,7 @@ await RunAndVerify( [Fact] public async Task AddKafka_UseConfigurationCreate_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddKafka("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddKafka("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -90,10 +87,7 @@ await RunAndVerify( [Fact] public async Task AddKafka_UseConfigurationServiceProvider_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddKafka("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddKafka("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -145,10 +139,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddKafka_UseConfigurationCreate_EnableDeliveryReportsFalse_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddKafka("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddKafka("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -217,10 +208,7 @@ await RunAndVerify( [Fact] public async Task AddKafka_UseConfigurationCreate_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddKafka("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddKafka("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -240,10 +228,7 @@ await RunAndVerify( [Fact] public async Task AddKafka_UseConfigurationServiceProvider_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddKafka("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddKafka("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -295,10 +280,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddKafka_UseConfigurationCreate_EnableDeliveryReportsFalse_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddKafka("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddKafka("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/AzuriteAccess.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/AzuriteAccess.cs similarity index 93% rename from tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/AzuriteAccess.cs rename to tests/NetEvolve.HealthChecks.Tests.Integration/Azure/AzuriteAccess.cs index 8f9ab7a..0528ea6 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/AzuriteAccess.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/AzuriteAccess.cs @@ -1,4 +1,4 @@ -namespace NetEvolve.HealthChecks.Tests.Integration.Azure.Blobs; +namespace NetEvolve.HealthChecks.Tests.Integration.Azure; using System; using System.Diagnostics.CodeAnalysis; diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/BlobContainerAvailableHealthCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/BlobContainerAvailableHealthCheckTests.cs index b098eaa..1aa22ff 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/BlobContainerAvailableHealthCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/BlobContainerAvailableHealthCheckTests.cs @@ -119,9 +119,7 @@ await RunAndVerify( options.ContainerName = "test"; options.Mode = BlobClientCreationMode.ServiceProvider; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }, @@ -178,9 +176,7 @@ await RunAndVerify(healthChecks => options.Mode = BlobClientCreationMode.SharedKey; options.ServiceUri = _uriBlobStorage; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }); diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/BlobServiceAvailableHealthCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/BlobServiceAvailableHealthCheckTests.cs index 544fb7d..c03d23c 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/BlobServiceAvailableHealthCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Blobs/BlobServiceAvailableHealthCheckTests.cs @@ -41,10 +41,7 @@ await RunAndVerify( { _ = healthChecks.AddBlobServiceAvailability( "ServiceServiceProviderHealthy", - options => - { - options.Mode = BlobClientCreationMode.ServiceProvider; - } + options => options.Mode = BlobClientCreationMode.ServiceProvider ); }, serviceBuilder: services => @@ -66,9 +63,7 @@ await RunAndVerify( { options.Mode = BlobClientCreationMode.ServiceProvider; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }, @@ -144,9 +139,7 @@ await RunAndVerify(healthChecks => options.Mode = BlobClientCreationMode.SharedKey; options.ServiceUri = _uriBlobStorage; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }); diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/AzuriteAccess.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/AzuriteAccess.cs deleted file mode 100644 index b817634..0000000 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/AzuriteAccess.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace NetEvolve.HealthChecks.Tests.Integration.Azure.Queues; - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Threading.Tasks; -using Testcontainers.Azurite; -using Xunit; - -public sealed class AzuriteAccess : IAsyncLifetime, IAsyncDisposable -{ - public const string AccountName = "devstoreaccount1"; - public const string AccountKey = - "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="; - - private readonly AzuriteContainer _container = new AzuriteBuilder() - .WithCommand("--skipApiVersionCheck") - .Build(); - - public string ConnectionString => _container.GetConnectionString(); - - public async Task DisposeAsync() => await _container.DisposeAsync().ConfigureAwait(false); - - public async Task InitializeAsync() => await _container.StartAsync().ConfigureAwait(false); - - async ValueTask IAsyncDisposable.DisposeAsync() => - await _container.DisposeAsync().ConfigureAwait(false); -} diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/QueueClientAvailableHealthCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/QueueClientAvailableHealthCheckTests.cs index 494874d..5a067be 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/QueueClientAvailableHealthCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/QueueClientAvailableHealthCheckTests.cs @@ -120,9 +120,7 @@ await RunAndVerify( options.QueueName = "test"; options.Mode = QueueClientCreationMode.ServiceProvider; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }, @@ -179,9 +177,7 @@ await RunAndVerify(healthChecks => options.Mode = QueueClientCreationMode.SharedKey; options.ServiceUri = _uriQueueStorage; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }); diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/QueueServiceAvailableHealthCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/QueueServiceAvailableHealthCheckTests.cs index 62ba0f7..038b3ea 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/QueueServiceAvailableHealthCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Queues/QueueServiceAvailableHealthCheckTests.cs @@ -41,10 +41,7 @@ await RunAndVerify( { _ = healthChecks.AddQueueServiceAvailability( "ServiceServiceProviderHealthy", - options => - { - options.Mode = QueueClientCreationMode.ServiceProvider; - } + options => options.Mode = QueueClientCreationMode.ServiceProvider ); }, serviceBuilder: services => @@ -66,9 +63,7 @@ await RunAndVerify( { options.Mode = QueueClientCreationMode.ServiceProvider; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }, @@ -144,9 +139,7 @@ await RunAndVerify(healthChecks => options.Mode = QueueClientCreationMode.SharedKey; options.ServiceUri = _uriQueueStorage; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }); diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/AzuriteAccess.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/AzuriteAccess.cs deleted file mode 100644 index 7ae5d16..0000000 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/AzuriteAccess.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace NetEvolve.HealthChecks.Tests.Integration.Azure.Tables; - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Threading.Tasks; -using Testcontainers.Azurite; -using Xunit; - -public sealed class AzuriteAccess : IAsyncLifetime, IAsyncDisposable -{ - public const string AccountName = "devstoreaccount1"; - public const string AccountKey = - "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="; - - private readonly AzuriteContainer _container = new AzuriteBuilder() - .WithCommand("--skipApiVersionCheck") - .Build(); - - public string ConnectionString => _container.GetConnectionString(); - - public async Task DisposeAsync() => await _container.DisposeAsync().ConfigureAwait(false); - - public async Task InitializeAsync() => await _container.StartAsync().ConfigureAwait(false); - - async ValueTask IAsyncDisposable.DisposeAsync() => - await _container.DisposeAsync().ConfigureAwait(false); -} diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/TableClientAvailableHealthCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/TableClientAvailableHealthCheckTests.cs index ad2ccff..9b2e0c8 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/TableClientAvailableHealthCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/TableClientAvailableHealthCheckTests.cs @@ -143,9 +143,7 @@ await RunAndVerify( options.TableName = "test"; options.Mode = TableClientCreationMode.ServiceProvider; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }, @@ -202,9 +200,7 @@ await RunAndVerify(healthChecks => options.Mode = TableClientCreationMode.SharedKey; options.ServiceUri = _uriTableStorage; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }); diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/TableServiceAvailableHealthCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/TableServiceAvailableHealthCheckTests.cs index 73301e3..e55071b 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/TableServiceAvailableHealthCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Azure/Tables/TableServiceAvailableHealthCheckTests.cs @@ -33,10 +33,7 @@ await RunAndVerify( { _ = healthChecks.AddTableServiceAvailability( "ServiceServiceProviderHealthy", - options => - { - options.Mode = TableClientCreationMode.ServiceProvider; - } + options => options.Mode = TableClientCreationMode.ServiceProvider ); }, serviceBuilder: services => @@ -58,9 +55,7 @@ await RunAndVerify( { options.Mode = TableClientCreationMode.ServiceProvider; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }, @@ -136,9 +131,7 @@ await RunAndVerify(healthChecks => options.Mode = TableClientCreationMode.SharedKey; options.ServiceUri = _uriTableStorage; options.ConfigureClientOptions = clientOptions => - { clientOptions.Retry.MaxRetries = 0; - }; } ); }); diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/ClickHouse/ClickHouseCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/ClickHouse/ClickHouseCheckTests.cs index 7b2eb9c..97ca83e 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/ClickHouse/ClickHouseCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/ClickHouse/ClickHouseCheckTests.cs @@ -23,10 +23,7 @@ await RunAndVerify(healthChecks => { _ = healthChecks.AddClickHouse( "TestContainerHealthy", - options => - { - options.ConnectionString = _database.ConnectionString; - } + options => options.ConnectionString = _database.ConnectionString ); }); @@ -77,10 +74,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddClickHouse_UseConfiguration_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddClickHouse("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddClickHouse("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -97,10 +91,7 @@ await RunAndVerify( [Fact] public async Task AddClickHouse_UseConfiguration_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddClickHouse("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddClickHouse("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -118,10 +109,7 @@ await RunAndVerify( [Fact] public async Task AddClickHouse_UseConfigration_ConnectionStringEmpty_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddClickHouse("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddClickHouse("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -135,10 +123,7 @@ await RunAndVerify( [Fact] public async Task AddClickHouse_UseConfigration_TimeoutMinusTwo_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddClickHouse("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddClickHouse("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/HealthChecks/ApplicationHealthyCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/HealthChecks/ApplicationHealthyCheckTests.cs index 57293b8..f470d8e 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/HealthChecks/ApplicationHealthyCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/HealthChecks/ApplicationHealthyCheckTests.cs @@ -9,8 +9,5 @@ public class ApplicationHealthyCheckTests : HealthCheckTestBase { [Fact] public async Task AddApplicationHealthy_ShouldReturnHealthy() => - await RunAndVerify(healthChecks => - { - _ = healthChecks.AddApplicationHealthy(); - }); + await RunAndVerify(healthChecks => _ = healthChecks.AddApplicationHealthy()); } diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/HealthChecks/ApplicationReadyCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/HealthChecks/ApplicationReadyCheckTests.cs index 64a0f28..8181096 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/HealthChecks/ApplicationReadyCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/HealthChecks/ApplicationReadyCheckTests.cs @@ -11,18 +11,12 @@ public class ApplicationReadyCheckTests : HealthCheckTestBase { [Fact] public async Task AddApplicationReady_ShouldReturnHealthy() => - await RunAndVerify(healthChecks => - { - _ = healthChecks.AddApplicationReady(); - }); + await RunAndVerify(healthChecks => _ = healthChecks.AddApplicationReady()); [Fact] public async Task AddApplicationReady_WithCustomName_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddApplicationReady(); - }, + healthChecks => _ = healthChecks.AddApplicationReady(), serverConfiguration: server => { var lifetime = server.Services.GetRequiredService(); diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Internals/HealthCheckTestBase.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Internals/HealthCheckTestBase.cs index eaf16aa..5867e8f 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Internals/HealthCheckTestBase.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Internals/HealthCheckTestBase.cs @@ -30,12 +30,7 @@ protected async ValueTask RunAndVerify( ) { var builder = new WebHostBuilder() - .ConfigureAppConfiguration( - (_, configBuilder) => - { - config?.Invoke(configBuilder); - } - ) + .ConfigureAppConfiguration((_, configBuilder) => config?.Invoke(configBuilder)) .ConfigureServices(services => { serviceBuilder?.Invoke(services); diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Internals/ModuleInitializer.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Internals/ModuleInitializer.cs index 189c74a..e932b92 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Internals/ModuleInitializer.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Internals/ModuleInitializer.cs @@ -16,11 +16,11 @@ public static void Init() VerifierSettings.AutoVerify(includeBuildServer: false); Verifier.DerivePathInfo( - (sourceFile, projectDirectory, type, method) => + (_, projectDirectory, type, method) => { var directory = Path.Combine(projectDirectory, "_snapshots"); - _ = Directory.CreateDirectory(directory); - return new(directory, type.Name, method.Name); + var createdDirectory = Directory.CreateDirectory(directory); + return new(createdDirectory.FullName, type.Name, method.Name); } ); } diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/MySql/MySqlCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/MySql/MySqlCheckTests.cs index 274dfff..7bf47fc 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/MySql/MySqlCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/MySql/MySqlCheckTests.cs @@ -23,10 +23,7 @@ await RunAndVerify(healthChecks => { _ = healthChecks.AddMySql( "TestContainerHealthy", - options => - { - options.ConnectionString = _database.ConnectionString; - } + options => options.ConnectionString = _database.ConnectionString ); }); @@ -78,10 +75,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddMySql_UseConfiguration_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddMySql("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddMySql("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -98,10 +92,7 @@ await RunAndVerify( [Fact] public async Task AddMySql_UseConfiguration_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddMySql("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddMySql("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -119,10 +110,7 @@ await RunAndVerify( [Fact] public async Task AddMySql_UseConfigration_ConnectionStringEmpty_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddMySql("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddMySql("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -136,10 +124,7 @@ await RunAndVerify( [Fact] public async Task AddMySql_UseConfigration_TimeoutMinusTwo_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddMySql("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddMySql("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/MySqlConnector/MySqlConnectorCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/MySqlConnector/MySqlConnectorCheckTests.cs index c4cbad0..4113bc0 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/MySqlConnector/MySqlConnectorCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/MySqlConnector/MySqlConnectorCheckTests.cs @@ -23,10 +23,7 @@ await RunAndVerify(healthChecks => { _ = healthChecks.AddMySql( "TestContainerHealthy", - options => - { - options.ConnectionString = _database.ConnectionString; - } + options => options.ConnectionString = _database.ConnectionString ); }); @@ -78,10 +75,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddMySql_UseConfiguration_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddMySql("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddMySql("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -98,10 +92,7 @@ await RunAndVerify( [Fact] public async Task AddMySql_UseConfiguration_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddMySql("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddMySql("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -119,10 +110,7 @@ await RunAndVerify( [Fact] public async Task AddMySql_UseConfigration_ConnectionStringEmpty_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddMySql("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddMySql("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -136,10 +124,7 @@ await RunAndVerify( [Fact] public async Task AddMySql_UseConfigration_TimeoutMinusTwo_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddMySql("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddMySql("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Npgsql/NpgsqlCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Npgsql/NpgsqlCheckTests.cs index 3d6e7bb..4eee33b 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Npgsql/NpgsqlCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Npgsql/NpgsqlCheckTests.cs @@ -23,10 +23,7 @@ await RunAndVerify(healthChecks => { _ = healthChecks.AddPostgreSql( "TestContainerHealthy", - options => - { - options.ConnectionString = _database.ConnectionString; - } + options => options.ConnectionString = _database.ConnectionString ); }); @@ -76,10 +73,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddPostgreSql_UseConfiguration_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddPostgreSql("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddPostgreSql("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -96,10 +90,7 @@ await RunAndVerify( [Fact] public async Task AddPostgreSql_UseConfiguration_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddPostgreSql("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddPostgreSql("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -117,10 +108,7 @@ await RunAndVerify( [Fact] public async Task AddPostgreSql_UseConfigration_ConnectionStringEmpty_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddPostgreSql("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddPostgreSql("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -134,10 +122,7 @@ await RunAndVerify( [Fact] public async Task AddPostgreSql_UseConfigration_TimeoutMinusTwo_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddPostgreSql("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddPostgreSql("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Oracle/OracleCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Oracle/OracleCheckTests.cs index 5278e1d..7f8d05f 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Oracle/OracleCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Oracle/OracleCheckTests.cs @@ -23,10 +23,7 @@ await RunAndVerify(healthChecks => { _ = healthChecks.AddOracle( "TestContainerHealthy", - options => - { - options.ConnectionString = _database.GetConnectionString(); - } + options => options.ConnectionString = _database.GetConnectionString() ); }); @@ -76,10 +73,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddOracle_UseConfiguration_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddOracle("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddOracle("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -96,10 +90,7 @@ await RunAndVerify( [Fact] public async Task AddOracle_UseConfiguration_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddOracle("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddOracle("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -117,10 +108,7 @@ await RunAndVerify( [Fact] public async Task AddOracle_UseConfigration_ConnectionStringEmpty_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddOracle("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddOracle("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -134,10 +122,7 @@ await RunAndVerify( [Fact] public async Task AddOracle_UseConfigration_TimeoutMinusTwo_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddOracle("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddOracle("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Redis/RedisDatabaseCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Redis/RedisDatabaseCheckTests.cs index 15ce927..c39c7b8 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Redis/RedisDatabaseCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Redis/RedisDatabaseCheckTests.cs @@ -41,10 +41,7 @@ await RunAndVerify( { _ = healthChecks.AddRedisDatabase( "TestContainerHealthy", - options => - { - options.ConnectionString = _database.GetConnectionString(); - } + options => options.ConnectionString = _database.GetConnectionString() ); }, serviceBuilder: builder => @@ -93,10 +90,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddRedisDatabase_UseConfiguration_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedisDatabase("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddRedisDatabase("TestContainerHealthy"), config => { var values = new Dictionary @@ -124,10 +118,7 @@ await RunAndVerify( [Fact] public async Task AddRedisDatabase_UseConfiguration_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedisDatabase("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddRedisDatabase("TestContainerDegraded"), config => { var values = new Dictionary @@ -146,10 +137,7 @@ await RunAndVerify( [Fact] public async Task AddRedisDatabase_UseConfigration_ConnectionStringEmpty_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedisDatabase("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddRedisDatabase("TestNoValues"), config => { var values = new Dictionary @@ -164,10 +152,7 @@ await RunAndVerify( [Fact] public async Task AddRedisDatabase_UseConfigration_TimeoutMinusTwo_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedisDatabase("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddRedisDatabase("TestNoValues"), config => { var values = new Dictionary diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/Redpanda/RedpandaCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/Redpanda/RedpandaCheckTests.cs index 1c8ce27..bec2271 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/Redpanda/RedpandaCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/Redpanda/RedpandaCheckTests.cs @@ -67,10 +67,7 @@ await RunAndVerify( [Fact] public async Task AddRedpanda_UseConfigurationCreate_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedpanda("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddRedpanda("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -90,10 +87,7 @@ await RunAndVerify( [Fact] public async Task AddRedpanda_UseConfigurationServiceProvider_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedpanda("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddRedpanda("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -145,10 +139,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddRedpanda_UseConfigurationCreate_EnableDeliveryReportsFalse_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedpanda("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddRedpanda("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -217,10 +208,7 @@ await RunAndVerify( [Fact] public async Task AddRedpanda_UseConfigurationCreate_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedpanda("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddRedpanda("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -243,10 +231,7 @@ await RunAndVerify( [Fact] public async Task AddRedpanda_UseConfigurationServiceProvider_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedpanda("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddRedpanda("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -301,10 +286,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddRedpanda_UseConfigurationCreate_EnableDeliveryReportsFalse_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddRedpanda("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddRedpanda("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/SQLite/SQLiteCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/SQLite/SQLiteCheckTests.cs index 07fcc32..fb6b901 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/SQLite/SQLiteCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/SQLite/SQLiteCheckTests.cs @@ -23,10 +23,7 @@ await RunAndVerify(healthChecks => { _ = healthChecks.AddSQLite( "TestContainerHealthy", - options => - { - options.ConnectionString = _database.ConnectionString; - } + options => options.ConnectionString = _database.ConnectionString ); }); @@ -77,10 +74,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddSQLite_UseConfiguration_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSQLite("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddSQLite("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -97,10 +91,7 @@ await RunAndVerify( [Fact] public async Task AddSQLite_UseConfiguration_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSQLite("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddSQLite("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -118,10 +109,7 @@ await RunAndVerify( [Fact] public async Task AddSQLite_UseConfigration_ConnectionStringEmpty_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSQLite("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddSQLite("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -135,10 +123,7 @@ await RunAndVerify( [Fact] public async Task AddSQLite_UseConfigration_TimeoutMinusTwo_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSQLite("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddSQLite("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/SqlServer/SqlServerCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/SqlServer/SqlServerCheckTests.cs index 2a9ef8e..4893a86 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/SqlServer/SqlServerCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/SqlServer/SqlServerCheckTests.cs @@ -23,10 +23,7 @@ await RunAndVerify(healthChecks => { _ = healthChecks.AddSqlServer( "TestContainerHealthy", - options => - { - options.ConnectionString = _database.ConnectionString; - } + options => options.ConnectionString = _database.ConnectionString ); }); @@ -77,10 +74,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddSqlServer_UseConfiguration_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSqlServer("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddSqlServer("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -97,10 +91,7 @@ await RunAndVerify( [Fact] public async Task AddSqlServer_UseConfiguration_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSqlServer("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddSqlServer("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -118,10 +109,7 @@ await RunAndVerify( [Fact] public async Task AddSqlServer_UseConfigration_ConnectionStringEmpty_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSqlServer("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddSqlServer("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -135,10 +123,7 @@ await RunAndVerify( [Fact] public async Task AddSqlServer_UseConfigration_TimeoutMinusTwo_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSqlServer("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddSqlServer("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/SqlServerLegacy/SqlServerLegacyCheckTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/SqlServerLegacy/SqlServerLegacyCheckTests.cs index 7de9194..ebdec54 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/SqlServerLegacy/SqlServerLegacyCheckTests.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/SqlServerLegacy/SqlServerLegacyCheckTests.cs @@ -23,10 +23,7 @@ await RunAndVerify(healthChecks => { _ = healthChecks.AddSqlServerLegacy( "TestContainerHealthy", - options => - { - options.ConnectionString = _database.ConnectionString; - } + options => options.ConnectionString = _database.ConnectionString ); }); @@ -77,10 +74,7 @@ await RunAndVerify(healthChecks => [Fact] public async Task AddSqlServerLegacy_UseConfiguration_ShouldReturnHealthy() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSqlServerLegacy("TestContainerHealthy"); - }, + healthChecks => _ = healthChecks.AddSqlServerLegacy("TestContainerHealthy"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -97,10 +91,7 @@ await RunAndVerify( [Fact] public async Task AddSqlServerLegacy_UseConfiguration_ShouldReturnDegraded() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSqlServerLegacy("TestContainerDegraded"); - }, + healthChecks => _ = healthChecks.AddSqlServerLegacy("TestContainerDegraded"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -118,10 +109,7 @@ await RunAndVerify( [Fact] public async Task AddSqlServerLegacy_UseConfigration_ConnectionStringEmpty_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSqlServerLegacy("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddSqlServerLegacy("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal) @@ -135,10 +123,7 @@ await RunAndVerify( [Fact] public async Task AddSqlServerLegacy_UseConfigration_TimeoutMinusTwo_ThrowException() => await RunAndVerify( - healthChecks => - { - _ = healthChecks.AddSqlServerLegacy("TestNoValues"); - }, + healthChecks => _ = healthChecks.AddSqlServerLegacy("TestNoValues"), config => { var values = new Dictionary(StringComparer.Ordinal)