public void Persistence_RandomGraph_UnitTest() { var saveGamePath = System.IO.Path.Combine(Environment.CurrentDirectory, "randomGraph.fs8"); TestHelper.ExecuteTestWithPersistence( () => TestHelper.CreateRandomGraph(100000, 20), element => { Assert.IsTrue(element != null); Assert.IsTrue(element.EdgeCount > 0); Assert.IsTrue(element.VertexCount > 0); }, element => element.Save(saveGamePath), () => { var reloadedF8 = new Fallen8(); reloadedF8.Load(saveGamePath); return reloadedF8; }, (reference, reloaded) => Assert.IsTrue(TestHelper.CheckIfFallen8IsEqual(reference, reloaded)), saveGamePath); }
public void Persistence_RandomGraph_UnitTest() { var saveGamePath = System.IO.Path.Combine(Environment.CurrentDirectory, "randomGraph.fs8"); TestHelper.ExecuteTestWithPersistence( () => TestHelper.CreateRandomGraph(100000, 20), element => { Assert.IsTrue(element != null); Assert.IsTrue(element.EdgeCount > 0); Assert.IsTrue(element.VertexCount > 0); }, element => element.Save(saveGamePath), () => { var reloadedF8 = new Fallen8(); reloadedF8.Load(saveGamePath); return(reloadedF8); }, (reference, reloaded) => Assert.IsTrue(TestHelper.CheckIfFallen8IsEqual(reference, reloaded)), saveGamePath); }
public void Load(string startServices) { Logger.LogInfo(String.Format("Loading Fallen-8. Start services: {0}", startServices)); _fallen8.Load(FindLatestFallen8(), Convert.ToBoolean(startServices)); }