Refactor code structure and optimize performance across multiple modules

This commit is contained in:
StellaOps Bot
2025-12-26 20:03:22 +02:00
parent c786faae84
commit b4fc66feb6
3353 changed files with 88254 additions and 1590657 deletions

View File

@@ -11,6 +11,7 @@ using Xunit;
using StellaOps.Cli.Commands;
using StellaOps.Cryptography;
using StellaOps.TestKit;
namespace StellaOps.Cli.Tests;
/// <summary>
@@ -19,7 +20,8 @@ namespace StellaOps.Cli.Tests;
/// </summary>
public class CryptoCommandTests
{
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void CryptoCommand_ShouldHaveExpectedSubcommands()
{
// Arrange
@@ -40,7 +42,8 @@ public class CryptoCommandTests
Assert.Contains(command.Children, c => c.Name == "profiles");
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void CryptoSignCommand_ShouldRequireInputOption()
{
// Arrange
@@ -61,7 +64,8 @@ public class CryptoCommandTests
Assert.Contains(result.Errors, e => e.Message.Contains("--input"));
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void CryptoVerifyCommand_ShouldRequireInputOption()
{
// Arrange
@@ -82,7 +86,8 @@ public class CryptoCommandTests
Assert.Contains(result.Errors, e => e.Message.Contains("--input"));
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void CryptoProfilesCommand_ShouldAcceptDetailsOption()
{
// Arrange
@@ -102,7 +107,8 @@ public class CryptoCommandTests
Assert.Empty(result.Errors);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task CryptoSignCommand_WithMissingFile_ShouldReturnError()
{
// Arrange
@@ -138,7 +144,8 @@ public class CryptoCommandTests
Assert.Contains("not found", output, StringComparison.OrdinalIgnoreCase);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task CryptoProfilesCommand_WithNoCryptoProviders_ShouldReturnError()
{
// Arrange
@@ -172,7 +179,8 @@ public class CryptoCommandTests
Assert.Contains("No crypto providers available", output, StringComparison.OrdinalIgnoreCase);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task CryptoProfilesCommand_WithCryptoProviders_ShouldListThem()
{
// Arrange
@@ -207,7 +215,8 @@ public class CryptoCommandTests
}
#if STELLAOPS_ENABLE_GOST
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void WithGostEnabled_ShouldShowGostInDistributionInfo()
{
// This test only runs when GOST is enabled at build time
@@ -217,7 +226,8 @@ public class CryptoCommandTests
#endif
#if STELLAOPS_ENABLE_EIDAS
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void WithEidasEnabled_ShouldShowEidasInDistributionInfo()
{
// This test only runs when eIDAS is enabled at build time
@@ -226,7 +236,8 @@ public class CryptoCommandTests
#endif
#if STELLAOPS_ENABLE_SM
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void WithSmEnabled_ShouldShowSmInDistributionInfo()
{
// This test only runs when SM is enabled at build time