public void It_should_return_a_copy_of_the_original()
            {
                var root     = Substitute.For <INodeData>();
                var rootCopy = Substitute.For <INode>();

                root.GetRuntime(null, null).ReturnsForAnyArgs(rootCopy);

                var graphData = Substitute.For <IGraphData>();
                IReadOnlyList <INodeData> nodeList = new List <INodeData> {
                    root
                };

                graphData.Nodes.Returns(nodeList);
                graphData.Root.Returns(root);

                var graph = new GraphRuntime(null, graphData);

                Assert.AreEqual(rootCopy, graph.GetCopy(root));
            }
            public void It_should_set_the_root_to_the_root_runtime_value()
            {
                var root     = Substitute.For <INodeData>();
                var rootCopy = Substitute.For <INode>();

                root.GetRuntime(null, null).ReturnsForAnyArgs(rootCopy);

                var graphData = Substitute.For <IGraphData>();
                IReadOnlyList <INodeData> nodeList = new List <INodeData> {
                    root
                };

                graphData.Nodes.Returns(nodeList);
                graphData.Root.Returns(root);

                var graph = new GraphRuntime(null, graphData);

                Assert.AreEqual(rootCopy, graph.Root);
            }
        public void Play(IGraphData graph, IGameObjectOverride[] gameObjectOverrides = null)
        {
            var runtime = new GraphRuntime(this, graph);

            Play(new DialoguePlayback(runtime, this, new DialogueEvents()), gameObjectOverrides);
        }
        public void PlayChild(IGraphData graph)
        {
            var runtime = new GraphRuntime(this, graph);

            PlayChild(new DialoguePlayback(runtime, this, new DialogueEvents()));
        }