XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEEDToolBox

【WinUI】XFE精英危险工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
using XFEEDToolBox.Core.Models;
using XFEEDToolBox.Core.Rendering;
using XFEExtension.NetCore.XUnit.Attributes;

namespace XFEEDToolBox.Test;

[TestFixture]
public sealed class GalaxyOriginalZonesTests
{
    [Test] public void OriginalRegionNamesAndFixedPointRasterHaveTheirOwnScale()
    {
        var map=GalaxyOriginalZones.Reference;
        Check.Equal(42,map.Zones.Count);Check.Equal("Galactic Centre",map.Zones[0].Name);Check.Equal("Inner Orion Spur",map.Zones[17].Name);Check.Equal("The Void",map.Zones[41].Name);
        Check.Equal("4f29773d81898c1889a7c7e766e09bff13df52f18d8eda57e17d6de72241272a",map.RasterSha256);
        Check.Equal(18,map.IdAt(new(0,0,0)));Check.Equal(1,map.IdAt(new(25.21875,-20.90625,25899.96875)));
        Check.That(Math.Abs(map.WorldX(2048)+map.OriginX-100000)>1000,"The GZM scale was incorrectly replaced with the density texture's extent.");
        Check.That(map.At(new(-60000,0,0)) is null&&map.At(new(100000,0,0)) is null);
    }
    [Test] public void OriginalZonesIgnoreHeightAndDoNotCreateSystemRecords()
    {
        var map=GalaxyOriginalZones.Reference;
        Check.Equal(map.IdAt(new(0,10000,0)),map.IdAt(new(0,-10000,0)));
        Check.Equal(2048*2048,map.Values.Length);Check.That(map.Zones.All(z=>z.Position.Y==0&&z.Pixels>0&&z.PixelBounds.Length==4));
    }
}