public void UpdatesSystemDevelopmentInRepository() { var view = SetupGrowthCalculator(); var starSystems = view.StarSystems.ToArray(); _economicSimulator.RunEmpire(new DeltaMetadata(ObjectId.Empty, 0), It.IsAny <ObjectId>()); _starSystemRepository .Verify( x => x.ApplyDevelopment( It.Is <IEnumerable <Delta <double> > >( y => ContainsSystemAndValue(y, starSystems[2], 300.0) && ContainsSystemAndValue(y, starSystems[4], 150.0) && ContainsSystemAndValue(y, starSystems[2], 20.0) && ContainsSystemAndValue(y, starSystems[4], 450.0) && ContainsSystemAndValue(y, starSystems[3], 270.0) && ContainsSystemAndValue(y, starSystems[2], 80.0) && ContainsSystemAndValue(y, starSystems[0], 90.0) && ContainsSystemAndValue(y, starSystems[1], 230.0) ) ), Times.Once ); }
private void RunForTick(Simulation simulation, DeltaMetadata deltaMetadata) { _militarySimulator.Run(deltaMetadata, simulation.Id); foreach (var id in simulation.EmpireIds) { _economicSimulator.RunEmpire(deltaMetadata, id); _diplomacySimulator.RunEmpire(deltaMetadata, id); } }