public void ThrowsIfTheToNodeIsNotInTheGraph()
            {
                EdgeListGraph <int> graph = new EdgeListGraph <int>();

                graph.AddNode(1);
                Assert.Throws <ArgumentException>(() => { graph.AddDirectedEdge(1, 2); });
            }
            public void AddsNewEdges()
            {
                //by value
                EdgeListGraph <int> graph = new EdgeListGraph <int>();

                graph.AddNode(1);
                graph.AddNode(2);
                graph.AddDirectedEdge(1, 2);
                int count = graph.AllEdges.Count();

                Assert.Equal(1, count);

                //by node
                graph = new EdgeListGraph <int>();
                EdgeListNode <int> node1 = new EdgeListNode <int>(1);
                EdgeListNode <int> node2 = new EdgeListNode <int>(2);

                graph.AddNode(node1);
                graph.AddNode(node2);
                graph.AddDirectedEdge(node1, node2);
                count = graph.AllEdges.Count();
                Assert.Equal(1, count);
            }