public void PocketWorldPipelineTest() { Pipeline pocketWorldPipeline = PipelineUtility.CreateEmptyPipelineWithLuaGraph(_luaScript, _additionalImports); pocketWorldPipeline.AddStep(new AreaTilesStep("Zone Layer", "Area Layer")); pocketWorldPipeline.AddStep(new AreaTileConnectorStep("Zone Layer", "Area Layer")); pocketWorldPipeline.AddStep(SetupWfcStep()); pocketWorldPipeline.AddStep(new ChildToParentPropagatorStep("Area Layer")); pocketWorldPipeline.AddStep(new GraphToGridLayoutStep("Area Layer")); Graph pocketWorldGraph = pocketWorldPipeline.Execute(); Console.WriteLine("--- Final Map: ---"); Debugging.PrintGraph(pocketWorldGraph.Entities); FileUtilities.WriteFile("PocketWorldGraph.dot", "./", DotGraphVisualizerStorage.SaveLayerGraph(pocketWorldGraph.GetLayer("Area Layer"))); }
public void PocketWorldPipelineInitializationTest() { Pipeline pipeline = PipelineUtility.CreateEmptyPipelineWithLuaGraph(_luaScript, _additionalImports); Graph resultGraph = pipeline.Execute(); Assert.NotNull(resultGraph, "There should be a graph object"); Assert.AreEqual("Pocket World", resultGraph.Name, "Expected the graph to be called 'Pocket World'"); Assert.AreEqual("Zone 1", resultGraph.Entities[0].Name, "Expected the graph to have a child node named 'Area 0'"); var areaLayer = resultGraph.GetLayer("Zone Layer"); Assert.NotNull(areaLayer, "Expected to find an 'Zone Layer'"); FileUtilities.WriteFile("GeneratedGraphFromLua.dot", "./", DotGraphVisualizerStorage.SaveGraph(resultGraph)); }