Package h07.graph

Class AdjacencyMatrixFactoryTest

    • Constructor Detail

      • AdjacencyMatrixFactoryTest

        public AdjacencyMatrixFactoryTest()
        Creates a new AdjacencyMatrixFactoryTest object. Requires that AdjacencyMatrixFactory exists and has a constructor with two parameters: the first one with type V[] and the second one with type A[][]. Also requires that the class has two fields, nodes and adjacencyMatrix.
    • Method Detail

      • testDefinition

        @Test
        public void testDefinition()
        Tests the definition of AdjacencyMatrixFactory.
        • Asserts that the class...
          • is public
          • is not abstract
          • is generic and has the type parameters V and A
          • implements DirectedGraphFactory
        • Asserts that the constructor is public
        • Asserts that the field nodes...
          • is private and final
          • is not static
          • has type V[]
        • Asserts that the field adjacencyMatrix...
          • is private and final
          • is not static
          • has type A[][]
        Specified by:
        testDefinition in class TestClass
      • testCreateDirectedGraph

        @Test
        public void testCreateDirectedGraph()
                                     throws ReflectiveOperationException
        Tests for AdjacencyMatrixFactory.createDirectedGraph().
        Asserts that the object returned by the tested method is actually an instance of DirectedGraphImpl.
        Throws:
        ReflectiveOperationException - if any invocation fails