diff --git a/Directory.Packages.props b/Directory.Packages.props index 26b31873..6754c037 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -37,6 +37,7 @@ + @@ -60,4 +61,4 @@ - + \ No newline at end of file diff --git a/src/NetEvolve.HealthChecks.Abstractions/SqlCheckBase.cs b/src/NetEvolve.HealthChecks.Abstractions/SqlCheckBase.cs index 1b810306..57e701e2 100644 --- a/src/NetEvolve.HealthChecks.Abstractions/SqlCheckBase.cs +++ b/src/NetEvolve.HealthChecks.Abstractions/SqlCheckBase.cs @@ -12,7 +12,7 @@ /// /// Configurable implementation of with focus on based implementations. /// -/// +/// Type of Configuration public abstract class SqlCheckBase : IHealthCheck where TConfiguration : class, ISqlCheckOptions { diff --git a/tests/NetEvolve.HealthChecks.Tests.Architecture/HealthCheckArchitecture.cs b/tests/NetEvolve.HealthChecks.Tests.Architecture/HealthCheckArchitecture.cs index f9a5772c..8646c7fe 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Architecture/HealthCheckArchitecture.cs +++ b/tests/NetEvolve.HealthChecks.Tests.Architecture/HealthCheckArchitecture.cs @@ -4,21 +4,6 @@ using System.Threading; using ArchUnitNET.Domain; using ArchUnitNET.Loader; -using NetEvolve.HealthChecks.Apache.Kafka; -using NetEvolve.HealthChecks.Azure.Blobs; -using NetEvolve.HealthChecks.Azure.Queues; -using NetEvolve.HealthChecks.Azure.Tables; -using NetEvolve.HealthChecks.ClickHouse; -using NetEvolve.HealthChecks.Dapr; -using NetEvolve.HealthChecks.Npgsql; -using NetEvolve.HealthChecks.Oracle; -using NetEvolve.HealthChecks.Redis; -using NetEvolve.HealthChecks.Redpanda; -using NetEvolve.HealthChecks.SQLite; -using NetEvolve.HealthChecks.SqlServer; -using NetEvolve.HealthChecks.SqlServer.Legacy; -using MySqlCheck = MySql.MySqlCheck; -using MySqlConnectorCheck = MySql.Connector.MySqlCheck; internal static class HealthCheckArchitecture { @@ -34,23 +19,24 @@ private static Architecture LoadArchitecture() { System.Reflection.Assembly[] assemblies = [ - typeof(KafkaCheck).Assembly, - typeof(BlobContainerAvailableHealthCheck).Assembly, - typeof(QueueClientAvailableHealthCheck).Assembly, - typeof(TableClientAvailableHealthCheck).Assembly, - typeof(ClickHouseCheck).Assembly, - typeof(DaprHealthCheck).Assembly, - typeof(MySqlCheck).Assembly, - typeof(MySqlConnectorCheck).Assembly, - typeof(NpgsqlCheck).Assembly, - typeof(OracleCheck).Assembly, - typeof(RedisDatabaseHealthCheck).Assembly, - typeof(RedpandaCheck).Assembly, - typeof(SQLiteCheck).Assembly, - typeof(SqlServerCheck).Assembly, - typeof(SqlServerLegacyCheck).Assembly, + typeof(Apache.Kafka.KafkaCheck).Assembly, + typeof(Azure.Blobs.BlobContainerAvailableHealthCheck).Assembly, + typeof(Azure.Queues.QueueClientAvailableHealthCheck).Assembly, + typeof(Azure.Tables.TableClientAvailableHealthCheck).Assembly, + typeof(ClickHouse.ClickHouseCheck).Assembly, + typeof(Dapr.DaprHealthCheck).Assembly, + typeof(MySql.MySqlCheck).Assembly, + typeof(MySql.Connector.MySqlCheck).Assembly, + typeof(Npgsql.NpgsqlCheck).Assembly, + typeof(Oracle.OracleCheck).Assembly, + typeof(Redis.RedisDatabaseHealthCheck).Assembly, + typeof(Redpanda.RedpandaCheck).Assembly, + typeof(SQLite.SQLiteCheck).Assembly, + typeof(SqlServer.SqlServerCheck).Assembly, + typeof(SqlServer.Legacy.SqlServerLegacyCheck).Assembly, ]; - var architecture = new ArchLoader() + + return new ArchLoader() .LoadAssembliesRecursively( assemblies, x => @@ -62,6 +48,5 @@ private static Architecture LoadArchitecture() : FilterResult.SkipAndContinue ) .Build(); - return architecture; } } diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/NetEvolve.HealthChecks.Tests.Integration.csproj b/tests/NetEvolve.HealthChecks.Tests.Integration/NetEvolve.HealthChecks.Tests.Integration.csproj index c6dd3b1d..d22a7ed1 100644 --- a/tests/NetEvolve.HealthChecks.Tests.Integration/NetEvolve.HealthChecks.Tests.Integration.csproj +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/NetEvolve.HealthChecks.Tests.Integration.csproj @@ -15,6 +15,7 @@ + diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/PublicApiTests.cs b/tests/NetEvolve.HealthChecks.Tests.Integration/PublicApiTests.cs new file mode 100644 index 00000000..cbdefb58 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/PublicApiTests.cs @@ -0,0 +1,73 @@ +namespace NetEvolve.HealthChecks.Tests.Integration; + +using System.ComponentModel; +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.Versioning; +using PublicApiGenerator; + +public class PublicApiTests +{ + private static readonly string[] _excludedAttributes = + [ + typeof(InternalsVisibleToAttribute).FullName!, + "System.Runtime.CompilerServices.IsByRefLikeAttribute", + typeof(TargetFrameworkAttribute).FullName!, + typeof(CLSCompliantAttribute).FullName!, + typeof(AssemblyMetadataAttribute).FullName!, + typeof(NeutralResourcesLanguageAttribute).FullName!, + typeof(AttributeUsageAttribute).FullName!, + ]; + + [Theory] + [MemberData(nameof(GetAssemblies))] + public Task PublicApi_HasNotChanged_Theory(Assembly assembly) + { + Assert.NotNull(assembly); + + var types = assembly.GetTypes().Where(IsVisibleToIntelliSense).ToArray(); + + var options = new ApiGeneratorOptions + { + ExcludeAttributes = _excludedAttributes, + IncludeTypes = types, + }; + + var publicApi = assembly.GeneratePublicApi(options); + + return Verify(publicApi).UseTypeName(assembly.GetName().Name); + } + + public static TheoryData GetAssemblies + { + get + { + var assemblies = Assembly + .GetExecutingAssembly()! + .GetReferencedAssemblies() + .Where(a => + a.Name?.StartsWith("NetEvolve.HealthChecks", StringComparison.OrdinalIgnoreCase) + == true + ) + .Select(Assembly.Load) + .ToArray(); + + var data = new TheoryData(); + data.AddRange(assemblies); + return data; + } + } + + private static bool IsVisibleToIntelliSense(Type type) + { + var browsable = type.GetCustomAttribute(); + if (browsable is null || browsable.Browsable) + { + return true; + } + + var editorBrowsable = type.GetCustomAttribute(); + return editorBrowsable is null || editorBrowsable.State != EditorBrowsableState.Never; + } +} diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Apache.Kafka.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Apache.Kafka.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..1484fe6b --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Apache.Kafka.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,20 @@ +namespace NetEvolve.HealthChecks.Apache.Kafka +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddKafka([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public class KafkaOptions + { + public KafkaOptions() { } + public Confluent.Kafka.ProducerConfig Configuration { get; set; } + public NetEvolve.HealthChecks.Apache.Kafka.ProducerHandleMode Mode { get; set; } + public int Timeout { get; set; } + public string Topic { get; set; } + } + public enum ProducerHandleMode + { + ServiceProvider = 0, + Create = 1, + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Azure.Blobs.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Azure.Blobs.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..b92f13f8 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Azure.Blobs.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,39 @@ +namespace NetEvolve.HealthChecks.Azure.Blobs +{ + public enum BlobClientCreationMode + { + ServiceProvider = 0, + DefaultAzureCredentials = 1, + ConnectionString = 2, + SharedKey = 3, + AzureSasCredential = 4, + } + public sealed class BlobContainerAvailableOptions + { + public BlobContainerAvailableOptions() { } + public string? AccountKey { get; set; } + public string? AccountName { get; set; } + public System.Action? ConfigureClientOptions { get; set; } + public string? ConnectionString { get; set; } + public string? ContainerName { get; set; } + public NetEvolve.HealthChecks.Azure.Blobs.BlobClientCreationMode Mode { get; set; } + public System.Uri? ServiceUri { get; set; } + public int Timeout { get; set; } + } + public sealed class BlobServiceAvailableOptions + { + public BlobServiceAvailableOptions() { } + public string? AccountKey { get; set; } + public string? AccountName { get; set; } + public System.Action? ConfigureClientOptions { get; set; } + public string? ConnectionString { get; set; } + public NetEvolve.HealthChecks.Azure.Blobs.BlobClientCreationMode Mode { get; set; } + public System.Uri? ServiceUri { get; set; } + public int Timeout { get; set; } + } + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddBlobContainerAvailability([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddBlobServiceAvailability([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Azure.Queues.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Azure.Queues.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..ac63cb80 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Azure.Queues.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,39 @@ +namespace NetEvolve.HealthChecks.Azure.Queues +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddQueueClientAvailability([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddQueueServiceAvailability([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public sealed class QueueClientAvailableOptions + { + public QueueClientAvailableOptions() { } + public string? AccountKey { get; set; } + public string? AccountName { get; set; } + public System.Action? ConfigureClientOptions { get; set; } + public string? ConnectionString { get; set; } + public NetEvolve.HealthChecks.Azure.Queues.QueueClientCreationMode Mode { get; set; } + public string? QueueName { get; set; } + public System.Uri? ServiceUri { get; set; } + public int Timeout { get; set; } + } + public enum QueueClientCreationMode + { + ServiceProvider = 0, + DefaultAzureCredentials = 1, + ConnectionString = 2, + SharedKey = 3, + AzureSasCredential = 4, + } + public sealed class QueueServiceAvailableOptions + { + public QueueServiceAvailableOptions() { } + public string? AccountKey { get; set; } + public string? AccountName { get; set; } + public System.Action? ConfigureClientOptions { get; set; } + public string? ConnectionString { get; set; } + public NetEvolve.HealthChecks.Azure.Queues.QueueClientCreationMode Mode { get; set; } + public System.Uri? ServiceUri { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Azure.Tables.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Azure.Tables.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..10c5a30b --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Azure.Tables.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,39 @@ +namespace NetEvolve.HealthChecks.Azure.Tables +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTableClientAvailability([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTableServiceAvailability([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public sealed class TableClientAvailableOptions + { + public TableClientAvailableOptions() { } + public string? AccountKey { get; set; } + public string? AccountName { get; set; } + public System.Action? ConfigureClientOptions { get; set; } + public string? ConnectionString { get; set; } + public NetEvolve.HealthChecks.Azure.Tables.TableClientCreationMode Mode { get; set; } + public System.Uri? ServiceUri { get; set; } + public string? TableName { get; set; } + public int Timeout { get; set; } + } + public enum TableClientCreationMode + { + ServiceProvider = 0, + DefaultAzureCredentials = 1, + ConnectionString = 2, + SharedKey = 3, + AzureSasCredential = 4, + } + public sealed class TableServiceAvailableOptions + { + public TableServiceAvailableOptions() { } + public string? AccountKey { get; set; } + public string? AccountName { get; set; } + public System.Action? ConfigureClientOptions { get; set; } + public string? ConnectionString { get; set; } + public NetEvolve.HealthChecks.Azure.Tables.TableClientCreationMode Mode { get; set; } + public System.Uri? ServiceUri { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.ClickHouse.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.ClickHouse.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..4c82d550 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.ClickHouse.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,14 @@ +namespace NetEvolve.HealthChecks.ClickHouse +{ + public sealed class ClickHouseOptions : NetEvolve.HealthChecks.Abstractions.ISqlCheckOptions + { + public ClickHouseOptions() { } + public string Command { get; } + public string ConnectionString { get; set; } + public int Timeout { get; set; } + } + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddClickHouse([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.MySql.Connector.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.MySql.Connector.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..ac85ddc9 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.MySql.Connector.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,14 @@ +namespace NetEvolve.HealthChecks.MySql.Connector +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddMySql([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public sealed class MySqlOptions : NetEvolve.HealthChecks.Abstractions.ISqlCheckOptions + { + public MySqlOptions() { } + public string Command { get; } + public string ConnectionString { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.MySql.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.MySql.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..533863ee --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.MySql.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,14 @@ +namespace NetEvolve.HealthChecks.MySql +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddMySql([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public sealed class MySqlOptions : NetEvolve.HealthChecks.Abstractions.ISqlCheckOptions + { + public MySqlOptions() { } + public string Command { get; } + public string ConnectionString { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Npgsql.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Npgsql.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..c3c0e63a --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Npgsql.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,14 @@ +namespace NetEvolve.HealthChecks.Npgsql +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddPostgreSql([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public sealed class NpgsqlOptions : NetEvolve.HealthChecks.Abstractions.ISqlCheckOptions + { + public NpgsqlOptions() { } + public string Command { get; } + public string ConnectionString { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Oracle.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Oracle.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..374caa8f --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Oracle.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,14 @@ +namespace NetEvolve.HealthChecks.Oracle +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddOracle([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public sealed class OracleOptions : NetEvolve.HealthChecks.Abstractions.ISqlCheckOptions + { + public OracleOptions() { } + public string Command { get; } + public string ConnectionString { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..b9622452 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,8 @@ +namespace NetEvolve.HealthChecks +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddApplicationHealthy([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, params string[] tags) { } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddApplicationReady([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, params string[] tags) { } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Redis.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Redis.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..a9cd11f1 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Redis.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,19 @@ +namespace NetEvolve.HealthChecks.Redis +{ + public enum ConnectionHandleMode + { + ServiceProvider = 0, + Create = 1, + } + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddRedisDatabase(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Action? options = null, params string[] tags) { } + } + public class RedisDatabaseOptions + { + public RedisDatabaseOptions() { } + public string? ConnectionString { get; set; } + public NetEvolve.HealthChecks.Redis.ConnectionHandleMode Mode { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Redpanda.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Redpanda.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..2c5f83b4 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.Redpanda.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,20 @@ +namespace NetEvolve.HealthChecks.Redpanda +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddRedpanda([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public enum ProducerHandleMode + { + ServiceProvider = 0, + Create = 1, + } + public class RedpandaOptions + { + public RedpandaOptions() { } + public Confluent.Kafka.ProducerConfig Configuration { get; set; } + public NetEvolve.HealthChecks.Redpanda.ProducerHandleMode Mode { get; set; } + public int Timeout { get; set; } + public string Topic { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.SQLite.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.SQLite.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..eb5dbb55 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.SQLite.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,14 @@ +namespace NetEvolve.HealthChecks.SQLite +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddSQLite([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public sealed class SQLiteOptions : NetEvolve.HealthChecks.Abstractions.ISqlCheckOptions + { + public SQLiteOptions() { } + public string Command { get; } + public string ConnectionString { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.SqlServer.Legacy.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.SqlServer.Legacy.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..bfc08fd7 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.SqlServer.Legacy.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,14 @@ +namespace NetEvolve.HealthChecks.SqlServer.Legacy +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddSqlServerLegacy([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public sealed class SqlServerLegacyOptions : NetEvolve.HealthChecks.Abstractions.ISqlCheckOptions + { + public SqlServerLegacyOptions() { } + public string Command { get; } + public string ConnectionString { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file diff --git a/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.SqlServer.PublicApi_HasNotChanged_Theory.verified.txt b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.SqlServer.PublicApi_HasNotChanged_Theory.verified.txt new file mode 100644 index 00000000..95596275 --- /dev/null +++ b/tests/NetEvolve.HealthChecks.Tests.Integration/_snapshots/NetEvolve.HealthChecks.SqlServer.PublicApi_HasNotChanged_Theory.verified.txt @@ -0,0 +1,14 @@ +namespace NetEvolve.HealthChecks.SqlServer +{ + public static class DependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddSqlServer([System.Diagnostics.CodeAnalysis.NotNull] this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, [System.Diagnostics.CodeAnalysis.NotNull] string name, System.Action? options = null, params string[] tags) { } + } + public sealed class SqlServerOptions : NetEvolve.HealthChecks.Abstractions.ISqlCheckOptions + { + public SqlServerOptions() { } + public string Command { get; } + public string ConnectionString { get; set; } + public int Timeout { get; set; } + } +} \ No newline at end of file