Use slim DTOs without audit timestamps; migrate legacy LeftPostcode/RightPostcode on read. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
740 B
C#
24 lines
740 B
C#
using FluentAssertions;
|
|
using Oms.Application.Shared;
|
|
|
|
namespace Oms.Tests;
|
|
|
|
public class KpiAreaSnapshotMapperTests
|
|
{
|
|
[Theory]
|
|
[InlineData("06000", "(00000,50000]", true)]
|
|
[InlineData("00000", "(00000,50000]", false)]
|
|
[InlineData("50000", "(00000,50000]", true)]
|
|
[InlineData("50001", "(00000,50000]", false)]
|
|
public void IsZipInLeftOpenRightClosedRange_ShouldMatchExpected(string zip, string range, bool expected)
|
|
{
|
|
KpiAreaSnapshotMapper.IsZipInLeftOpenRightClosedRange(zip, range).Should().Be(expected);
|
|
}
|
|
|
|
[Fact]
|
|
public void BuildPostcodeRange_ShouldFormatLeftOpenRightClosed()
|
|
{
|
|
KpiAreaSnapshotMapper.BuildPostcodeRange("00000", "50000").Should().Be("(00000,50000]");
|
|
}
|
|
}
|