Skip to content

Commit

Permalink
unify last type in the assembly + test + readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Simply007 committed Nov 24, 2021
1 parent 2f4304f commit caa9ac3
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 4 deletions.
28 changes: 28 additions & 0 deletions Kentico.Kontent.Delivery.Abstractions.Tests/CheckNamespaces.cs
Original file line number Diff line number Diff line change
@@ -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;
}

/// <summary>
/// See Kentico.Kontent.Delivery.Abstractions Readme for more information.
/// </summary>
[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));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Kentico.Kontent.Delivery.Abstractions\Kentico.Kontent.Delivery.Abstractions.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Kentico.Kontent.Delivery.Abstractions.Extensions
namespace Kentico.Kontent.Delivery.Abstractions
{
/// <summary>
/// A class which contains extension methods on <see cref="DeliveryOptions"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 6 additions & 0 deletions Kentico.Kontent.Delivery.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit caa9ac3

Please sign in to comment.