コード例 #1
0
        public void Test_NodeExists()
        {
            GraphVizProcessor gvp = new GraphVizProcessor();

            gvp.graph = new Graph(GraphType.Digraph, new Stmt_list());

            //Node exists
            gvp.AddNode("a");
            if (!gvp.NodeExists("a"))
            {
                Assert.Fail("Node not found.");
            }

            //Node is part of an edge
            gvp.AddEdge("a", "b");
            if (!gvp.NodeExistsInEdge("a"))
            {
                Assert.Fail("Node in an edge not found.");
            }
        }