Ejemplo n.º 1
0
        public void VertexIndexOutOfRange_ExceptionThrown(int value)
        {
            //Arrange
            DataStructures.Graph graph = new DataStructures.Graph(5);

            //Act
            Action act = () => { var adjacent = graph.Adj(value); };

            //Assert
            Assert.Throws <IndexOutOfRangeException>(act);
        }
Ejemplo n.º 2
0
        public void SecondVertexIndexOutOfRange_ExceptionThrown(int value)
        {
            //Arrange
            DataStructures.Graph graph = new DataStructures.Graph(5);

            //Act
            Action act = () => graph.AddEdge(4, value);

            //Assert
            Assert.Throws <IndexOutOfRangeException>(act);
        }