mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 18:11:10 +00:00
Standardizes test projects against conventions
This commit is contained in:
1 parent
59e16d645a
commit
ced1f778c4
78 files changed
+283
-201
No files matched your search
+1
-1
@@ -14,7 +14,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.UnitTests.Core.Maintenance.ApplicationSetup.Queries.CheckInitiliazation;
|
||||
namespace Lumina.Application.UnitTests.Core.Maintenance.ApplicationSetup.Queries.CheckInitialization;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="CheckInitializationQueryHandler"/> class.
|
||||
+2
@@ -11,6 +11,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.UnitTests.Core.Plugins.Commands.ReorderLibraryMetadataProviders;
|
||||
@@ -18,6 +19,7 @@ namespace Lumina.Application.UnitTests.Core.Plugins.Commands.ReorderLibraryMetad
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="ReorderLibraryMetadataProvidersCommandHandler"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ReorderLibraryMetadataProvidersCommandHandlerTests
|
||||
{
|
||||
private readonly IUnitOfWork _mockUnitOfWork;
|
||||
|
||||
+2
@@ -10,6 +10,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.UnitTests.Core.Plugins.Commands.SetLibraryMetadataProviderEnabled;
|
||||
@@ -17,6 +18,7 @@ namespace Lumina.Application.UnitTests.Core.Plugins.Commands.SetLibraryMetadataP
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="SetLibraryMetadataProviderEnabledCommandHandler"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class SetLibraryMetadataProviderEnabledCommandHandlerTests
|
||||
{
|
||||
private readonly IUnitOfWork _mockUnitOfWork;
|
||||
|
||||
+2
@@ -9,6 +9,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.UnitTests.Core.Plugins.Commands.UpdatePluginSettings;
|
||||
@@ -16,6 +17,7 @@ namespace Lumina.Application.UnitTests.Core.Plugins.Commands.UpdatePluginSetting
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="UpdatePluginSettingsCommandHandler"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class UpdatePluginSettingsCommandHandlerTests
|
||||
{
|
||||
private readonly IUnitOfWork _mockUnitOfWork;
|
||||
|
||||
+2
@@ -10,6 +10,7 @@ using NSubstitute;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.UnitTests.Core.Plugins.Queries.GetPlugins;
|
||||
@@ -17,6 +18,7 @@ namespace Lumina.Application.UnitTests.Core.Plugins.Queries.GetPlugins;
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="GetPluginsQueryHandler"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPluginsQueryHandlerTests
|
||||
{
|
||||
private readonly IUnitOfWork _mockUnitOfWork;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Entities;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="Directory"/> class.
|
||||
+1
-1
@@ -8,7 +8,7 @@ using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Entities;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="File"/> class.
|
||||
+1
-1
@@ -8,7 +8,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Entities;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="UnixRootItem"/> class.
|
||||
+1
-1
@@ -9,7 +9,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Entities;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="WindowsRootItem"/> class.
|
||||
+1
-1
@@ -11,7 +11,7 @@ using Lumina.Domain.SharedKernel.Common.Enums.FileSystem;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="FileSystemItem"/> class.
|
||||
+1
-1
@@ -19,7 +19,7 @@ using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Services;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="DirectoryProviderService"/> class.
|
||||
+1
-1
@@ -18,7 +18,7 @@ using System.Runtime.InteropServices;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Services;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="DirectoryService"/> class.
|
||||
+1
-1
@@ -12,7 +12,7 @@ using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Services;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="DriveService"/> class.
|
||||
+1
-1
@@ -18,7 +18,7 @@ using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Services;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="FileProviderService"/> class.
|
||||
+1
-1
@@ -18,7 +18,7 @@ using System.Runtime.InteropServices;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Services;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="FileService"/> class.
|
||||
+1
-1
@@ -18,7 +18,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Services;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="FileTypeService"/> class.
|
||||
+1
-1
@@ -12,7 +12,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Services;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="PathService"/> class.
|
||||
+2
-2
@@ -4,7 +4,7 @@ using Lumina.Domain.Common.Primitives;
|
||||
using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Services;
|
||||
using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Strategies.Environment;
|
||||
using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
||||
using Lumina.Domain.Fixtures.Common.Enums.PhotoLibrary;
|
||||
using Lumina.Domain.SharedKernel.Fixtures.Common.Enums.PhotoLibrary;
|
||||
using Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.PhotoLibrary;
|
||||
using NSubstitute;
|
||||
@@ -17,7 +17,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Services;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="ThumbnailService"/> class.
|
||||
+1
-1
@@ -5,7 +5,7 @@ using NSubstitute;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Strategies.Environment;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Strategies.Environment;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="EnvironmentContext"/> class.
|
||||
+1
-1
@@ -11,7 +11,7 @@ using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Strategies.Path;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Strategies.Path;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="UnixPathStrategy"/> class.
|
||||
+1
-1
@@ -11,7 +11,7 @@ using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Strategies.Path;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Strategies.Path;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="WindowsPathStrategy"/> class.
|
||||
+1
-1
@@ -8,7 +8,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO.Abstractions;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Strategies.Platform;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Strategies.Platform;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="PlatformContextFactory"/> class.
|
||||
+1
-1
@@ -7,7 +7,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Strategies.Platform;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Strategies.Platform;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="PlatformContextManager"/> class.
|
||||
+1
-1
@@ -6,7 +6,7 @@ using NSubstitute;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.Strategies.Platform;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.Strategies.Platform;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="WindowsPlatformContext"/> and <see cref="UnixPlatformContext"/> classes.
|
||||
+1
-1
@@ -6,7 +6,7 @@ using Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBoundedCon
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.ValueObjects;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="FileSystemPathId"/> class.
|
||||
+1
-1
@@ -6,7 +6,7 @@ using Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBoundedCon
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.ValueObjects;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="PathSegment"/> class.
|
||||
+1
-1
@@ -7,7 +7,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.ValueObjects;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="StreamInfo"/> class.
|
||||
+1
-1
@@ -8,7 +8,7 @@ using System.Linq;
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.ValueObjects;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="Thumbnail"/> class.
|
||||
+1
-1
@@ -6,7 +6,7 @@ using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.UnitTests.Core.Aggregates.BookLibraryAggregate;
|
||||
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.WrittenContentLibraryBoundedContext.BookLibraryAggregate;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="Book"/> class.
|
||||
@@ -42,5 +42,6 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Lumina.Domain\Lumina.Domain.csproj" />
|
||||
<ProjectReference Include="..\..\Common\Lumina.Domain.Fixtures\Lumina.Domain.Fixtures.csproj" />
|
||||
<ProjectReference Include="..\..\Common\Lumina.Domain.SharedKernel.Fixtures\Lumina.Domain.SharedKernel.Fixtures.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+2
-2
@@ -29,7 +29,7 @@ public class CommonSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CommonSettingsModelValidator_WhenThemeProvided_ShouldNotHaveValidationError()
|
||||
public void Validate_WhenThemeProvided_ShouldNotHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
CommonSettingsDto model = _fixture.Build<CommonSettingsDto>()
|
||||
@@ -44,7 +44,7 @@ public class CommonSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CommonSettingsModelValidator_WhenThemeNotProvided_ShouldNotHaveValidationError()
|
||||
public void Validate_WhenThemeNotProvided_ShouldNotHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
CommonSettingsDto model = _fixture.Build<CommonSettingsDto>()
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ public class DatabaseSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DatabaseSettingsModelValidator_WhenDefaultConnectionProvided_ShouldNotHaveValidationError()
|
||||
public void Validate_WhenDefaultConnectionProvided_ShouldNotHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
DatabaseSettingsDto model = _fixture.Build<DatabaseSettingsDto>()
|
||||
@@ -44,7 +44,7 @@ public class DatabaseSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DatabaseSettingsModelValidator_WhenDefaultConnectionNotProvided_ShouldHaveValidationError()
|
||||
public void Validate_WhenDefaultConnectionNotProvided_ShouldHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
DatabaseSettingsDto model = _fixture.Build<DatabaseSettingsDto>()
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@ public class EncryptionSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EncryptionSettingsModelValidator_WhenValidBase64SecretKeyProvided_ShouldNotHaveValidationError()
|
||||
public void Validate_WhenValidBase64SecretKeyProvided_ShouldNotHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
EncryptionSettingsDto model = _fixture.Build<EncryptionSettingsDto>()
|
||||
@@ -44,7 +44,7 @@ public class EncryptionSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EncryptionSettingsModelValidator_WhenSecretKeyIsEmpty_ShouldHaveValidationError()
|
||||
public void Validate_WhenSecretKeyIsEmpty_ShouldHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
EncryptionSettingsDto model = _fixture.Build<EncryptionSettingsDto>()
|
||||
@@ -63,7 +63,7 @@ public class EncryptionSettingsDtoValidatorTests
|
||||
[InlineData("not-a-base64-string")]
|
||||
[InlineData("invalid!base64")]
|
||||
[InlineData("123")]
|
||||
public void EncryptionSettingsModelValidator_WhenSecretKeyIsNotBase64_ShouldHaveValidationError(string invalidBase64)
|
||||
public void Validate_WhenSecretKeyIsNotBase64_ShouldHaveValidationError(string invalidBase64)
|
||||
{
|
||||
// Arrange
|
||||
EncryptionSettingsDto model = _fixture.Build<EncryptionSettingsDto>()
|
||||
|
||||
+6
-6
@@ -29,7 +29,7 @@ public class JwtSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void JwtSettingsModelValidator_WhenAllPropertiesValid_ShouldNotHaveValidationError()
|
||||
public void Validate_WhenAllPropertiesValid_ShouldNotHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
JwtSettingsDto model = _fixture.Build<JwtSettingsDto>()
|
||||
@@ -47,7 +47,7 @@ public class JwtSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void JwtSettingsModelValidator_WhenSecretKeyIsEmpty_ShouldHaveValidationErrors()
|
||||
public void Validate_WhenSecretKeyIsEmpty_ShouldHaveValidationErrors()
|
||||
{
|
||||
// Arrange
|
||||
JwtSettingsDto model = _fixture.Build<JwtSettingsDto>()
|
||||
@@ -67,7 +67,7 @@ public class JwtSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void JwtSettingsModelValidator_WhenSecretKeyTooShort_ShouldHaveValidationError()
|
||||
public void Validate_WhenSecretKeyTooShort_ShouldHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
JwtSettingsDto model = _fixture.Build<JwtSettingsDto>()
|
||||
@@ -89,7 +89,7 @@ public class JwtSettingsDtoValidatorTests
|
||||
[InlineData(0)]
|
||||
[InlineData(-1)]
|
||||
[InlineData(-60)]
|
||||
public void JwtSettingsModelValidator_WhenExpiryMinutesNotPositive_ShouldHaveValidationError(int minutes)
|
||||
public void Validate_WhenExpiryMinutesNotPositive_ShouldHaveValidationError(int minutes)
|
||||
{
|
||||
// Arrange
|
||||
JwtSettingsDto model = _fixture.Build<JwtSettingsDto>()
|
||||
@@ -108,7 +108,7 @@ public class JwtSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void JwtSettingsModelValidator_WhenIssuerIsEmpty_ShouldHaveValidationError()
|
||||
public void Validate_WhenIssuerIsEmpty_ShouldHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
JwtSettingsDto model = _fixture.Build<JwtSettingsDto>()
|
||||
@@ -127,7 +127,7 @@ public class JwtSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void JwtSettingsModelValidator_WhenAudienceIsEmpty_ShouldHaveValidationError()
|
||||
public void Validate_WhenAudienceIsEmpty_ShouldHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
JwtSettingsDto model = _fixture.Build<JwtSettingsDto>()
|
||||
|
||||
+6
-6
@@ -29,7 +29,7 @@ public class MediaSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MediaSettingsModelValidator_WhenRootDirectoryProvided_ShouldNotHaveValidationError()
|
||||
public void Validate_WhenRootDirectoryProvided_ShouldNotHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
MediaSettingsDto model = _fixture.Build<MediaSettingsDto>()
|
||||
@@ -44,7 +44,7 @@ public class MediaSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MediaSettingsModelValidator_WhenRootDirectoryIsEmpty_ShouldHaveValidationError()
|
||||
public void Validate_WhenRootDirectoryIsEmpty_ShouldHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
MediaSettingsDto model = _fixture.Build<MediaSettingsDto>()
|
||||
@@ -60,7 +60,7 @@ public class MediaSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MediaSettingsModelValidator_WhenRootDirectoryIsWhitespace_ShouldHaveValidationError()
|
||||
public void Validate_WhenRootDirectoryIsWhitespace_ShouldHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
MediaSettingsDto model = _fixture.Build<MediaSettingsDto>()
|
||||
@@ -76,7 +76,7 @@ public class MediaSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MediaSettingsModelValidator_WhenMediaLibrariesDirectoryIsEmpty_ShouldHaveValidationError()
|
||||
public void Validate_WhenMediaLibrariesDirectoryIsEmpty_ShouldHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
MediaSettingsDto model = _fixture.Build<MediaSettingsDto>()
|
||||
@@ -92,7 +92,7 @@ public class MediaSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MediaSettingsModelValidator_WhenMediaLibrariesDirectoryProvided_ShouldNotHaveValidationError()
|
||||
public void Validate_WhenMediaLibrariesDirectoryProvided_ShouldNotHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
MediaSettingsDto model = _fixture.Build<MediaSettingsDto>()
|
||||
@@ -107,7 +107,7 @@ public class MediaSettingsDtoValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MediaSettingsModelValidator_WhenMediaLibrariesDirectoryIsWhitespace_ShouldHaveValidationError()
|
||||
public void Validate_WhenMediaLibrariesDirectoryIsWhitespace_ShouldHaveValidationError()
|
||||
{
|
||||
// Arrange
|
||||
MediaSettingsDto model = _fixture.Build<MediaSettingsDto>()
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Plugins.Contracts.UnitTests.Fakes;
|
||||
namespace Lumina.Plugins.Contracts.UnitTests.Common.Fakes;
|
||||
|
||||
/// <summary>
|
||||
/// A fake book metadata provider used to exercise the plugin contracts from outside.
|
||||
+8
-6
@@ -2,21 +2,23 @@
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
using Lumina.Plugins.Contracts.Core.Metadata;
|
||||
using Lumina.Plugins.Contracts.UnitTests.Fakes;
|
||||
using Lumina.Plugins.Contracts.UnitTests.Common.Fakes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Plugins.Contracts.UnitTests.Metadata;
|
||||
namespace Lumina.Plugins.Contracts.UnitTests.Core.Metadata;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="IRemoteMetadataProvider"/> contracts.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RemoteMetadataProviderTests
|
||||
{
|
||||
private readonly IRemoteMetadataProvider _provider = new FakeBookMetadataProvider();
|
||||
private readonly IRemoteMetadataProvider _sut = new FakeBookMetadataProvider();
|
||||
|
||||
[Fact]
|
||||
public async Task GetMetadataAsync_WhenCalledThroughNonGenericInterface_ShouldReturnTypedMetadata()
|
||||
@@ -28,7 +30,7 @@ public class RemoteMetadataProviderTests
|
||||
Title: "The Fellowship of the Ring");
|
||||
|
||||
// Act
|
||||
MetadataDto? result = await _provider.GetMetadataAsync(lookup, CancellationToken.None);
|
||||
MetadataDto? result = await _sut.GetMetadataAsync(lookup, CancellationToken.None);
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(result);
|
||||
@@ -46,7 +48,7 @@ public class RemoteMetadataProviderTests
|
||||
Path: "/books/unknown.epub");
|
||||
|
||||
// Act
|
||||
MetadataDto? result = await _provider.GetMetadataAsync(lookup, CancellationToken.None);
|
||||
MetadataDto? result = await _sut.GetMetadataAsync(lookup, CancellationToken.None);
|
||||
|
||||
// Assert
|
||||
Assert.Null(result);
|
||||
@@ -62,7 +64,7 @@ public class RemoteMetadataProviderTests
|
||||
Title: "The Fellowship of the Ring");
|
||||
|
||||
// Act
|
||||
IReadOnlyList<MetadataDto> result = await _provider.GetSearchResultsAsync(lookup, CancellationToken.None);
|
||||
IReadOnlyList<MetadataDto> result = await _sut.GetSearchResultsAsync(lookup, CancellationToken.None);
|
||||
|
||||
// Assert
|
||||
Assert.Single(result);
|
||||
+8
-4
@@ -1,24 +1,28 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Plugins.Contracts.Core.Plugins;
|
||||
using Lumina.Plugins.Contracts.Core.Plugins.Settings;
|
||||
using Lumina.Plugins.Contracts.UnitTests.Fakes;
|
||||
using Lumina.Plugins.Contracts.UnitTests.Common.Fakes;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Plugins.Contracts.UnitTests.Plugins;
|
||||
namespace Lumina.Plugins.Contracts.UnitTests.Core.Plugins;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="IPlugin"/> contract.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PluginTests
|
||||
{
|
||||
private readonly IPlugin _plugin = new FakeBookMetadataProvider();
|
||||
private readonly IPlugin _sut = new FakeBookMetadataProvider();
|
||||
|
||||
[Fact]
|
||||
public void GetSettingsSchema_WhenCalled_ShouldReturnDeclaredSettings()
|
||||
{
|
||||
// Arrange
|
||||
|
||||
// Act
|
||||
IReadOnlyList<PluginSettingDescriptor> schema = _plugin.GetSettingsSchema();
|
||||
IReadOnlyList<PluginSettingDescriptor> schema = _sut.GetSettingsSchema();
|
||||
|
||||
// Assert
|
||||
Assert.Equal(2, schema.Count);
|
||||
+3
-3
@@ -20,15 +20,15 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Endpoints.FileSystemManagement.
|
||||
/// Contains unit tests for the <see cref="GetTypeEndpoint"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetFileSystemTypeEndpointTests
|
||||
public class GetTypeEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetFileSystemQuery, FileSystemTypeResponse> _mockHandler;
|
||||
private readonly GetTypeEndpoint _sut;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetFileSystemTypeEndpointTests"/> class.
|
||||
/// Initializes a new instance of the <see cref="GetTypeEndpointTests"/> class.
|
||||
/// </summary>
|
||||
public GetFileSystemTypeEndpointTests()
|
||||
public GetTypeEndpointTests()
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetFileSystemQuery, FileSystemTypeResponse>>();
|
||||
_sut = Factory.Create<GetTypeEndpoint>(_mockHandler);
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Lumina.Presentation.Api.UnitTests.Core.Endpoints.WrittenContentLibrary.BookLibrary.Books;
|
||||
namespace Lumina.Presentation.Api.UnitTests.Core.Endpoints.Library.WrittenContentLibrary.BookLibrary.Books.AddBook;
|
||||
internal class AddBookEndpointTests
|
||||
{
|
||||
}
|
||||
Reference in new issue
Block a user