using AcDream.App.World; using Xunit; namespace AcDream.App.Tests.World; /// /// Full truth-table for TeleportArrivalRules.Decide after the §3.4 readiness-gate change. /// public class TeleportArrivalRulesTests { [Fact] public void Unhydratable_IsImpossible_Outdoor() { Assert.Equal(ArrivalReadiness.Impossible, TeleportArrivalRules.Decide( claimUnhydratable: true, indoor: false, indoorCellReady: false, outdoorReady: false)); } [Fact] public void Unhydratable_IsImpossible_Indoor() { Assert.Equal(ArrivalReadiness.Impossible, TeleportArrivalRules.Decide( claimUnhydratable: true, indoor: true, indoorCellReady: true, outdoorReady: false)); } [Fact] public void Indoor_CellReady_IsReady() { Assert.Equal(ArrivalReadiness.Ready, TeleportArrivalRules.Decide( claimUnhydratable: false, indoor: true, indoorCellReady: true, outdoorReady: false)); } [Fact] public void Indoor_CellNotReady_IsNotReady() { Assert.Equal(ArrivalReadiness.NotReady, TeleportArrivalRules.Decide( claimUnhydratable: false, indoor: true, indoorCellReady: false, outdoorReady: false)); } [Fact] public void Outdoor_LandblockLoaded_IsReady() { Assert.Equal(ArrivalReadiness.Ready, TeleportArrivalRules.Decide( claimUnhydratable: false, indoor: false, indoorCellReady: false, outdoorReady: true)); } [Fact] public void Outdoor_LandblockNotLoaded_IsNotReady() { // §3.4: the #145 residual — outdoor arrival on a not-yet-streamed landblock // must hold. Previously returned Ready immediately. Assert.Equal(ArrivalReadiness.NotReady, TeleportArrivalRules.Decide( claimUnhydratable: false, indoor: false, indoorCellReady: false, outdoorReady: false)); } }