diff --git a/Kentico.Kontent.Delivery.Abstractions.Tests/CheckNamespaces.cs b/Kentico.Kontent.Delivery.Abstractions.Tests/CheckNamespaces.cs new file mode 100644 index 00000000..84fc7dac --- /dev/null +++ b/Kentico.Kontent.Delivery.Abstractions.Tests/CheckNamespaces.cs @@ -0,0 +1,28 @@ +using System; +using System.Linq; +using System.Reflection; +using Xunit; +using Xunit.Abstractions; + +namespace Kentico.Kontent.Delivery.Abstractions.Tests; + +public class CheckNamespaces +{ + private readonly ITestOutputHelper output; + + public CheckNamespaces(ITestOutputHelper output) + { + this.output = output; + } + + /// + /// See Kentico.Kontent.Delivery.Abstractions Readme for more information. + /// + [Fact] + public void AllNamespacecAreCorrect() + { + var abstractionTypes = Assembly.LoadFrom("Kentico.Kontent.Delivery.Abstractions.dll"); + + Assert.All(abstractionTypes.GetTypes(), t => Assert.Equal("Kentico.Kontent.Delivery.Abstractions", t.Namespace)); + } +} \ No newline at end of file diff --git a/Kentico.Kontent.Delivery.Abstractions.Tests/Kentico.Kontent.Delivery.Abstractions.Tests.csproj b/Kentico.Kontent.Delivery.Abstractions.Tests/Kentico.Kontent.Delivery.Abstractions.Tests.csproj new file mode 100644 index 00000000..213bbd09 --- /dev/null +++ b/Kentico.Kontent.Delivery.Abstractions.Tests/Kentico.Kontent.Delivery.Abstractions.Tests.csproj @@ -0,0 +1,25 @@ + + + + net6.0 + false + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/Kentico.Kontent.Delivery.Abstractions/Extensions/DeliveryOptionsExtensions.cs b/Kentico.Kontent.Delivery.Abstractions/Extensions/DeliveryOptionsExtensions.cs index 623b582f..e4b0f9ff 100644 --- a/Kentico.Kontent.Delivery.Abstractions/Extensions/DeliveryOptionsExtensions.cs +++ b/Kentico.Kontent.Delivery.Abstractions/Extensions/DeliveryOptionsExtensions.cs @@ -1,4 +1,4 @@ -namespace Kentico.Kontent.Delivery.Abstractions.Extensions +namespace Kentico.Kontent.Delivery.Abstractions { /// /// A class which contains extension methods on . diff --git a/Kentico.Kontent.Delivery.Extensions.DependencyInjection/Extensions/ServiceCollectionExtensions.cs b/Kentico.Kontent.Delivery.Extensions.DependencyInjection/Extensions/ServiceCollectionExtensions.cs index 032b5583..86fb5169 100644 --- a/Kentico.Kontent.Delivery.Extensions.DependencyInjection/Extensions/ServiceCollectionExtensions.cs +++ b/Kentico.Kontent.Delivery.Extensions.DependencyInjection/Extensions/ServiceCollectionExtensions.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using Kentico.Kontent.Delivery.Abstractions.Extensions; using System; namespace Kentico.Kontent.Delivery.Extensions.DependencyInjection diff --git a/Kentico.Kontent.Delivery.Tests/DeliveryOptionsExtensionsTests.cs b/Kentico.Kontent.Delivery.Tests/DeliveryOptionsExtensionsTests.cs index e27c5f79..482599f4 100644 --- a/Kentico.Kontent.Delivery.Tests/DeliveryOptionsExtensionsTests.cs +++ b/Kentico.Kontent.Delivery.Tests/DeliveryOptionsExtensionsTests.cs @@ -1,7 +1,6 @@ using AutoFixture; using FluentAssertions; using Kentico.Kontent.Delivery.Abstractions; -using Kentico.Kontent.Delivery.Abstractions.Extensions; using System.Collections.Generic; using Xunit; diff --git a/Kentico.Kontent.Delivery.sln b/Kentico.Kontent.Delivery.sln index c0530e60..c79610e7 100644 --- a/Kentico.Kontent.Delivery.sln +++ b/Kentico.Kontent.Delivery.sln @@ -32,6 +32,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kentico.Kontent.Delivery.Ex EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kentico.Kontent.Delivery.Extensions.DependencyInjection.Tests", "Kentico.Kontent.Delivery.Extensions.DependencyInjection.Tests\Kentico.Kontent.Delivery.Extensions.DependencyInjection.Tests.csproj", "{1582662E-39EA-426F-AE11-AC10E87B4791}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kentico.Kontent.Delivery.Abstractions.Tests", "Kentico.Kontent.Delivery.Abstractions.Tests\Kentico.Kontent.Delivery.Abstractions.Tests.csproj", "{F82D45A6-B0F5-4E40-A43B-4AFFF23EAF96}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -86,6 +88,10 @@ Global {1582662E-39EA-426F-AE11-AC10E87B4791}.Debug|Any CPU.Build.0 = Debug|Any CPU {1582662E-39EA-426F-AE11-AC10E87B4791}.Release|Any CPU.ActiveCfg = Release|Any CPU {1582662E-39EA-426F-AE11-AC10E87B4791}.Release|Any CPU.Build.0 = Release|Any CPU + {F82D45A6-B0F5-4E40-A43B-4AFFF23EAF96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F82D45A6-B0F5-4E40-A43B-4AFFF23EAF96}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F82D45A6-B0F5-4E40-A43B-4AFFF23EAF96}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F82D45A6-B0F5-4E40-A43B-4AFFF23EAF96}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Kentico.Kontent.Delivery/Extensions/ServiceCollectionExtensions.cs b/Kentico.Kontent.Delivery/Extensions/ServiceCollectionExtensions.cs index 1f0ea7bb..4c7a6b69 100644 --- a/Kentico.Kontent.Delivery/Extensions/ServiceCollectionExtensions.cs +++ b/Kentico.Kontent.Delivery/Extensions/ServiceCollectionExtensions.cs @@ -9,7 +9,6 @@ using Kentico.Kontent.Delivery.ContentItems.InlineContentItems; using Kentico.Kontent.Delivery.Helpers; using Kentico.Kontent.Delivery.RetryPolicy; -using Kentico.Kontent.Delivery.Abstractions.Extensions; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions;