Ejemplo n.º 1
0
        public void GetOutputDegree_ThenNumberOfOutgoingEdges()
        {
            // given
            testObject.AddEdgeBetween(testObject[1], testObject[1]);
            testObject.AddEdgeBetween(testObject[1], testObject[3]);
            testObject.AddEdgeBetween(testObject[1], testObject[4]);
            testObject.AddEdgeBetween(testObject[1], testObject[7]);
            testObject.AddEdgeBetween(testObject[1], testObject[9]);
            testObject.AddEdgeBetween(testObject[2], testObject[1]);
            testObject.AddEdgeBetween(testObject[6], testObject[1]);
            // when
            long result = testObject.GetOutputDegree(testObject[1]);

            // then
            result.Should().Be(7);
        }
 public int GetOutputDegree(Vertex <TVertexId> vertex) => graph.GetOutputDegree(vertex);