admin/src/Oms.Tests/KpiAreaSnapshotMapperTests.cs
zzh 74a71991b2
All checks were successful
Build and Deploy / deploy (push) Successful in 1m2s
feat: 统一价格/黑名单/偏远分区匹配,并落库 MatchDim
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 16:12:09 +08:00

26 lines
664 B
C#

using FluentAssertions;
using Oms.Application.Shared;
namespace Oms.Tests;
public class KpiAreaSnapshotMapperTests
{
[Fact]
public void BuildPostcodeRange_ShouldEncodeClosedRange()
{
KpiAreaSnapshotMapper.BuildPostcodeRange("00000", "50000").Should().Be("[00000,50000]");
}
[Fact]
public void BuildPostcodeRange_EqualBounds_ShouldEncodeExact()
{
KpiAreaSnapshotMapper.BuildPostcodeRange("90001", "90001").Should().Be("exact:90001");
}
[Fact]
public void BuildPostcodeRange_LeftOnly_ShouldEncodePrefix()
{
KpiAreaSnapshotMapper.BuildPostcodeRange("90", null).Should().Be("prefix:90");
}
}