public void ThreeVertexGraphWithoutCycelsTest()
        {
            var graph = new AdjacencyGraph(3);

            graph.AddArrow(0, 1);
            graph.AddArrow(1, 2);

            var result = searcher.FindCycles(graph);

            Assert.That(result.Count, Is.EqualTo(0));
        }
        public void TestReciprocalPoints()
        {
            var graph = new AdjacencyGraph(2);

            graph.AddArrow(0, 1)
            .AddArrow(1, 0);

            Assert.That(graph.AreReciprocal(0, 1));
        }
        public void TestVerticeCanPointToMultipleVertices()
        {
            var graph = new AdjacencyGraph(3);

            graph.AddArrow(0, 1)
            .AddArrow(0, 2);

            Assert.That(graph.VerticesCount == 3);
            Assert.That(graph.HasArrow(0, 1));
            Assert.That(graph.HasArrow(0, 2));
        }
        public void ThrowWhenAddArrowItself()
        {
            var graph = new AdjacencyGraph(1);

            Assert.Throws <ArgumentException>(() => graph.AddArrow(0, 0));
        }
        public void ThrowWhenAddArrowWithNotExistedEndTest()
        {
            var graph = new AdjacencyGraph(1);

            Assert.Throws <ArgumentException>(() => graph.AddArrow(0, 1));
        }