A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
test(sim): exactly touching legislature and government periods are not an overlap
eyalgolanecf71eaac54f
diff --git a/sim/Statecraft.Sim.Tests/PeriodValidationTests.cs b/sim/Statecraft.Sim.Tests/PeriodValidationTests.csindex 9504253b7..addb6182a 100644--- a/sim/Statecraft.Sim.Tests/PeriodValidationTests.cs+++ b/sim/Statecraft.Sim.Tests/PeriodValidationTests.cs@@ -40,6 +40,17 @@ public class PeriodValidationTestsAssert.Null(Offices.Government(c, new DateTime(1949, 3, 5)));}+ [Fact]+ public void ExactlyTouchingPeriodsAreNotAnOverlap()+ {+ // The fixture's legislatures meet at 1949-02-14 and its governments at 1949-03-10: prev.to == next.from.+ var c = ContentLoader.Load(Fixture.Write(new Dictionary<string, string>()));+ Assert.Equal(new DateTime(1949, 2, 14), c.Legislatures.Find(l => l.Id == "council")!.To);+ Assert.Equal(new DateTime(1949, 2, 14), c.Legislatures.Find(l => l.Id == "house")!.From);+ Assert.Equal(new DateTime(1949, 3, 10), c.Governments.Find(g => g.Id == "gov1")!.To);+ Assert.Equal(new DateTime(1949, 3, 10), c.Governments.Find(g => g.Id == "gov2")!.From);+ }+[Fact]public void ATermRunningPastTheOfficesAbolitionIsALoadError(){