Ejemplo n.º 1
0
        public void FourVerticesGraphConnectedVertexForZeroVertex()
        {
            var graph = new AdjacencyListGraph(4)
                        .AddArrow(0, 1)
                        .AddArrow(0, 2)
                        .AddArrow(1, 0)
                        .AddArrow(0, 3);
            var expectedVertices = new[] { 1, 2, 3 };

            var actualVertices = graph.GetConnectedVertices(0);

            Assert.That(actualVertices, Is.EqualTo(expectedVertices));
        }