Class ChickenNuggetGraphFactoryTest.ChickenNuggetGraphTest

    • Field Detail

      • getAllNodes

        public final Method getAllNodes
        Method object for h07.graph.DirectedGraph.getAllNodes()
      • getChildrenForNode

        public final Method getChildrenForNode
        Method object for h07.graph.DirectedGraph.getChildrenForNode(V)
      • getArcWeightBetween

        public final Method getArcWeightBetween
        Method object for h07.graph.DirectedGraph.getArcWeightBetween(V, V)
      • addNode

        public final Method addNode
        Method object for h07.graph.DirectedGraph.addNode(V)
      • removeNode

        public final Method removeNode
        Method object for h07.graph.DirectedGraph.removeNode(V)
      • connectNodes

        public final Method connectNodes
        Method object for h07.graph.DirectedGraph.connectNodes(V, A, V)
      • disconnectNodes

        public final Method disconnectNodes
        Method object for h07.graph.DirectedGraph.disconnectNodes(V, V)
    • Method Detail

      • testGetAllNodes

        @Test
        public void testGetAllNodes()
                             throws ReflectiveOperationException
        Tests for getAllNodes() on the DirectedGraph returned by ChickenNuggetGraphFactory.createDirectedGraph().
        Asserts that the collection returned by the tested method is immutable and has the same size and elements as nodes.
        Throws:
        ReflectiveOperationException - if any invocation fails
      • testGetChildrenForNode

        @Test
        public void testGetChildrenForNode()
                                    throws ReflectiveOperationException
        Tests for getChildrenForNode(Integer) on the DirectedGraph returned by ChickenNuggetGraphFactory.createDirectedGraph().
        Asserts that the collection returned by the tested method is immutable. Further asserts that the collection has the same size and elements as the expected set of children for a given node. Also asserts that the method throws a NullPointerException if invoked with null and a NoSuchElementException if invoked with a node that is not in this graph.
        Throws:
        ReflectiveOperationException - if any invocation fails
      • testGetArcWeightBetween

        @Test
        public void testGetArcWeightBetween()
                                     throws ReflectiveOperationException
        Tests for getArcWeightBetween(Integer, Integer) on the DirectedGraph returned by ChickenNuggetGraphFactory.createDirectedGraph().
        Asserts that the values returned by the tested method for given pairs of nodes equals the expected ones. Also asserts that the method throws a NullPointerException if invoked with null and a NoSuchElementException if invoked with a node that is not in this graph.
        Throws:
        ReflectiveOperationException - if any invocation fails
      • testAddNode

        @Test
        public void testAddNode()
        Tests for addNode(Integer) on the DirectedGraph returned by ChickenNuggetGraphFactory.createDirectedGraph().
        Asserts that a UnsupportedOperationException is thrown whenever invoked, regardless of parameters.
      • testRemoveNode

        @Test
        public void testRemoveNode()
        Tests for removeNode(Integer) on the DirectedGraph returned by ChickenNuggetGraphFactory.createDirectedGraph().
        Asserts that a UnsupportedOperationException is thrown whenever invoked, regardless of parameters.
      • testConnectNodes

        @Test
        public void testConnectNodes()
        Tests for connectNodes(Integer, Integer, Integer) on the DirectedGraph returned by ChickenNuggetGraphFactory.createDirectedGraph().
        Asserts that a UnsupportedOperationException is thrown whenever invoked, regardless of parameters.
      • testDisconnectNodes

        @Test
        public void testDisconnectNodes()
        Tests for disconnectNodes(Integer, Integer) on the DirectedGraph returned by ChickenNuggetGraphFactory.createDirectedGraph().
        Asserts that a UnsupportedOperationException is thrown whenever invoked, regardless of parameters.
      • newInstance

        public Object newInstance()
        Returns a new DirectedGraph object. This method invokes ChickenNuggetGraphFactory.createDirectedGraph() and returns the result.
        Returns:
        the DirectedGraph instance