Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -49,7 +49,8 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
_output = output;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task FetchParseMap_ProducesCanonicalAdvisory()
|
||||
{
|
||||
await using var provider = await BuildServiceProviderAsync();
|
||||
@@ -104,7 +105,8 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
pendingMappings!.AsDocumentArray.Should().BeEmpty();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task FetchParseMap_ExclusiveUpperBound_ProducesExclusiveNormalizedRule()
|
||||
{
|
||||
await using var provider = await BuildServiceProviderAsync();
|
||||
@@ -136,7 +138,8 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
.WhoseValue.Should().Be(">= 3.2.0 < 4.0.0");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task FetchParseMap_ExclusiveLowerBound_ProducesExclusiveNormalizedRule()
|
||||
{
|
||||
await using var provider = await BuildServiceProviderAsync();
|
||||
@@ -169,7 +172,8 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
.WhoseValue.Should().Be("> 1.2.0 <= 2.4.0");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task FetchParseMap_SingleBound_ProducesMinimumOnlyConstraint()
|
||||
{
|
||||
await using var provider = await BuildServiceProviderAsync();
|
||||
@@ -208,7 +212,8 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
.WhoseValue.Should().Be(">= 5.0.0");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task FetchParseMap_UpperBoundOnlyExclusive_ProducesLessThanRule()
|
||||
{
|
||||
await using var provider = await BuildServiceProviderAsync();
|
||||
@@ -241,7 +246,8 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
.WhoseValue.Should().Be("< 3.5.0");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task FetchParseMap_UpperBoundOnlyInclusive_ProducesLessThanOrEqualRule()
|
||||
{
|
||||
await using var provider = await BuildServiceProviderAsync();
|
||||
@@ -273,7 +279,8 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
.WhoseValue.Should().Be("<= 4.2.0");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task FetchParseMap_LowerBoundOnlyExclusive_ProducesGreaterThanRule()
|
||||
{
|
||||
await using var provider = await BuildServiceProviderAsync();
|
||||
@@ -306,7 +313,8 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
.WhoseValue.Should().Be("> 1.9.0");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task FetchParseMap_InvalidSegment_ProducesFallbackRange()
|
||||
{
|
||||
await using var provider = await BuildServiceProviderAsync();
|
||||
@@ -332,7 +340,8 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
.WhoseValue.Should().Be("지원 버전: 최신 업데이트 적용");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task Telemetry_RecordsMetrics()
|
||||
{
|
||||
await using var provider = await BuildServiceProviderAsync();
|
||||
@@ -340,6 +349,7 @@ public sealed class KisaConnectorTests : IAsyncLifetime
|
||||
|
||||
using var metrics = new KisaMetricCollector();
|
||||
|
||||
using StellaOps.TestKit;
|
||||
var connector = provider.GetRequiredService<KisaConnector>();
|
||||
await connector.FetchAsync(provider, CancellationToken.None);
|
||||
await connector.ParseAsync(provider, CancellationToken.None);
|
||||
|
||||
@@ -8,6 +8,7 @@ using StellaOps.Concelier.Connector.Common.Html;
|
||||
using StellaOps.Concelier.Connector.Kisa.Internal;
|
||||
using Xunit;
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.Concelier.Connector.Kisa.Tests;
|
||||
|
||||
public sealed class KisaDetailParserTests
|
||||
@@ -15,7 +16,8 @@ public sealed class KisaDetailParserTests
|
||||
private static readonly Uri DetailApiUri = new("https://test.local/rssDetailData.do?IDX=5868");
|
||||
private static readonly Uri DetailPageUri = new("https://test.local/detailDos.do?IDX=5868");
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public void ParseHtmlPayload_ProducesExpectedModels()
|
||||
{
|
||||
var parser = new KisaDetailParser(new HtmlContentSanitizer());
|
||||
|
||||
Reference in New Issue
Block a user