name.angoca.db2sa.core.graph.model
Class GraphNodeTest

Package class diagram package GraphNodeTest
java.lang.Object
  extended by name.angoca.db2sa.core.graph.model.GraphNodeTest

public final class GraphNodeTest
extends Object

These are the test for a node in the graph.

Control Version

Version:
1.7.0 2009-11-22
Author:
Andres Gomez Casanova (AngocA)

Constructor Summary
GraphNodeTest()
          Default constructor.
 
Method Summary
 void testAddEndingNodeParent()
          Test that a graph node be referenced by EndingNode as parent of it.
 void testAddNullChild()
          Test that a graph node cannot receive a null way.
 void testAddNullParent()
          Test that a graph node cannot receive a null parent.
 void testAddTwiceSameChild()
          Adds twice the same child node.
 void testAddTwiceSameParent()
          Adds twice the same parent node.
 void testCongruent()
          Tests if two consecutive calls returns the same value.
 void testConstructorNull1()
          Tests that the graph node has to receive a not null parameter.
 void testConstructorNull2()
          Tests that the graph node has to receive a not null parameter.
 void testEqualsDifferentChildren()
          Test two identical nodes with different children.
 void testEqualsDifferentMixed()
          Test two different nodes (reserved and non reserved).
 void testEqualsDifferentNotReserved()
          Test two different nodes (non reserved).
 void testEqualsDifferentParents()
          Test two identical nodes with different parents.
 void testEqualsDifferentReserved()
          Test two different nodes (reserved).
 void testEqualsMoreChildren()
          Test two identical nodes with one of them with more children.
 void testEqualsNotReserved()
          Test two identical nodes that represents a not reserved word.
 void testEqualsNull()
          Test equals with other null.
 void testEqualsOtherObject()
          Test equals with other object.
 void testEqualsReserved()
          Test two identical nodes that represents a reserved word.
 void testEqualsSameChildren()
          Test two identical nodes with same children.
 void testHashCodeDifferent()
          Test a the hashcode of two different nodes.
 void testHashCodeDifferentWithChildren()
          Test a the hashcode of two different objects.
 void testHashCodeIdenticalNotReserved()
          Test a the hashcode of two identical non reserved nodes.
 void testHashCodeIdenticalReserved()
          Test a the hashcode of two identical reserved nodes.
 void testInvalidName()
          Test the creation of a node with an invalid name.
 void testReferencingStartingNode()
          Tests that a node cannot reference to StartingNode.
 void testRemoveChild()
          Removes a child from the list of children.
 void testRemoveNullChild()
          Tries to remove a null child.
 void testRemoveNullParent()
          Tries to remove a null parent.
 void testRemoveParent()
          Removes a parent from the list of parents.
 void testRepresentCapitalReservedFalse()
          Represents a reserved word in capitals with a reserved word not in capitals.
 void testRepresentCapitalReservedTrue()
          Represents a reserved word in capitals.
 void testRepresentNotReservedTrue()
          Represents a word with a not reserved word.
 void testRepresentReservedFalse()
          Represents two different reserved words.
 void testRepresentReservedTrue()
          Represents a reserved word.
 void testRepresentsNull()
          Tests the represents method that can not receive a null parameter.
 void testSeveralOperations()
          Tests addParent.
 void testSimpleMethods()
          Tests the getter methods.
 void testSymmetricNotReserved()
          Tests the symmetry of equals not reserved.
 void testSymmetricReserved()
          Tests the symmetry of equals reserved.
 void testToStringNotReserved()
          Test a node that is not a reserved word.
 void testToStringReserved()
          Test a node that is a reserved word.
 void testToStringWithChildren()
          Test a node with children.
 void testToStringWithParents()
          Test a node with parents.
 void testTransitivity()
          Tests the transitivity of the equals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphNodeTest

public GraphNodeTest()
Default constructor.

Method Detail

testAddEndingNodeParent

public void testAddEndingNodeParent()
                             throws AbstractGraphException
Test that a graph node be referenced by EndingNode as parent of it.

Throws:
AbstractGraphException - Never.

testAddNullChild

public void testAddNullChild()
                      throws AbstractGraphException
Test that a graph node cannot receive a null way.

Throws:
AbstractGraphException - Never.

testAddNullParent

public void testAddNullParent()
                       throws AbstractGraphException
Test that a graph node cannot receive a null parent.

Throws:
AbstractGraphException - Never.

testAddTwiceSameChild

public void testAddTwiceSameChild()
                           throws AbstractGraphException
Adds twice the same child node.

Throws:
AbstractGraphException - Never.

testAddTwiceSameParent

public void testAddTwiceSameParent()
                            throws AbstractGraphException
Adds twice the same parent node.

Throws:
AbstractGraphException - Never.

testCongruent

public void testCongruent()
                   throws InvalidGraphNodeException
Tests if two consecutive calls returns the same value.

Throws:
InvalidGraphNodeException - Never

testConstructorNull1

public void testConstructorNull1()
                          throws InvalidGraphNodeException
Tests that the graph node has to receive a not null parameter.

Throws:
InvalidGraphNodeException - Never.

testConstructorNull2

public void testConstructorNull2()
                          throws InvalidGraphNodeException
Tests that the graph node has to receive a not null parameter.

Throws:
InvalidGraphNodeException - Never.

testEqualsDifferentChildren

public void testEqualsDifferentChildren()
                                 throws AbstractGraphException
Test two identical nodes with different children.

Throws:
AbstractGraphException - Never

testEqualsDifferentMixed

public void testEqualsDifferentMixed()
                              throws InvalidGraphNodeException
Test two different nodes (reserved and non reserved).

Throws:
InvalidGraphNodeException - Never.

testEqualsDifferentNotReserved

public void testEqualsDifferentNotReserved()
                                    throws InvalidGraphNodeException
Test two different nodes (non reserved).

Throws:
InvalidGraphNodeException - Never.

testEqualsDifferentParents

public void testEqualsDifferentParents()
                                throws AbstractGraphException
Test two identical nodes with different parents.

Throws:
AbstractGraphException - Never

testEqualsDifferentReserved

public void testEqualsDifferentReserved()
                                 throws InvalidGraphNodeException
Test two different nodes (reserved).

Throws:
InvalidGraphNodeException - Never.

testEqualsMoreChildren

public void testEqualsMoreChildren()
                            throws AbstractGraphException
Test two identical nodes with one of them with more children.

Throws:
AbstractGraphException - Never.

testEqualsNotReserved

public void testEqualsNotReserved()
                           throws InvalidGraphNodeException
Test two identical nodes that represents a not reserved word.

Throws:
InvalidGraphNodeException - Never.

testEqualsNull

public void testEqualsNull()
                    throws InvalidGraphNodeException
Test equals with other null.

Throws:
InvalidGraphNodeException - Never.

testEqualsOtherObject

public void testEqualsOtherObject()
                           throws InvalidGraphNodeException
Test equals with other object.

Throws:
InvalidGraphNodeException - Never.

testEqualsReserved

public void testEqualsReserved()
                        throws InvalidGraphNodeException
Test two identical nodes that represents a reserved word.

Throws:
InvalidGraphNodeException

testEqualsSameChildren

public void testEqualsSameChildren()
                            throws AbstractGraphException
Test two identical nodes with same children.

Throws:
AbstractGraphException - Never.

testHashCodeDifferent

public void testHashCodeDifferent()
                           throws InvalidGraphNodeException
Test a the hashcode of two different nodes.

Throws:
InvalidGraphNodeException - Never.

testHashCodeDifferentWithChildren

public void testHashCodeDifferentWithChildren()
                                       throws AbstractGraphException
Test a the hashcode of two different objects.

Throws:
AbstractGraphException - Never.

testHashCodeIdenticalNotReserved

public void testHashCodeIdenticalNotReserved()
                                      throws InvalidGraphNodeException
Test a the hashcode of two identical non reserved nodes.

Throws:
InvalidGraphNodeException - Never.

testHashCodeIdenticalReserved

public void testHashCodeIdenticalReserved()
                                   throws InvalidGraphNodeException
Test a the hashcode of two identical reserved nodes.

Throws:
InvalidGraphNodeException - Never.

testInvalidName

public void testInvalidName()
                     throws InvalidGraphNodeException
Test the creation of a node with an invalid name.

Throws:
InvalidGraphNodeException - Never

testReferencingStartingNode

public void testReferencingStartingNode()
                                 throws AbstractGraphException
Tests that a node cannot reference to StartingNode.

Throws:
AbstractGraphException - Never.

testRemoveChild

public void testRemoveChild()
                     throws AbstractGraphException
Removes a child from the list of children.

Throws:
AbstractGraphException - Never.

testRemoveNullChild

public void testRemoveNullChild()
                         throws AbstractGraphException
Tries to remove a null child.

Throws:
AbstractGraphException - Never.

testRemoveNullParent

public void testRemoveNullParent()
                          throws AbstractGraphException
Tries to remove a null parent.

Throws:
AbstractGraphException - Never.

testRemoveParent

public void testRemoveParent()
                      throws AbstractGraphException
Removes a parent from the list of parents.

Throws:
AbstractGraphException - Never.

testRepresentCapitalReservedFalse

public void testRepresentCapitalReservedFalse()
                                       throws InvalidGraphNodeException
Represents a reserved word in capitals with a reserved word not in capitals.

Throws:
InvalidGraphNodeException - Never.

testRepresentCapitalReservedTrue

public void testRepresentCapitalReservedTrue()
                                      throws InvalidGraphNodeException
Represents a reserved word in capitals.

Throws:
InvalidGraphNodeException - Never.

testRepresentNotReservedTrue

public void testRepresentNotReservedTrue()
                                  throws InvalidGraphNodeException
Represents a word with a not reserved word.

Throws:
InvalidGraphNodeException - Never.

testRepresentReservedFalse

public void testRepresentReservedFalse()
                                throws InvalidGraphNodeException
Represents two different reserved words.

Throws:
InvalidGraphNodeException - Never.

testRepresentReservedTrue

public void testRepresentReservedTrue()
                               throws InvalidGraphNodeException
Represents a reserved word.

Throws:
InvalidGraphNodeException - Never.

testRepresentsNull

public void testRepresentsNull()
                        throws InvalidGraphNodeException
Tests the represents method that can not receive a null parameter.

Throws:
InvalidGraphNodeException - Never.

testSeveralOperations

public void testSeveralOperations()
                           throws AbstractGraphException
Tests addParent.

Throws:
AbstractGraphException - Never.

testSimpleMethods

public void testSimpleMethods()
                       throws InvalidGraphNodeException
Tests the getter methods.

Throws:
InvalidGraphNodeException - Never.

testSymmetricNotReserved

public void testSymmetricNotReserved()
                              throws InvalidGraphNodeException
Tests the symmetry of equals not reserved.

Throws:
InvalidGraphNodeException - Never.

testSymmetricReserved

public void testSymmetricReserved()
                           throws InvalidGraphNodeException
Tests the symmetry of equals reserved.

Throws:
InvalidGraphNodeException - Never.

testToStringNotReserved

public void testToStringNotReserved()
                             throws InvalidGraphNodeException
Test a node that is not a reserved word.

Throws:
InvalidGraphNodeException - Never.

testToStringReserved

public void testToStringReserved()
                          throws InvalidGraphNodeException
Test a node that is a reserved word.

Throws:
InvalidGraphNodeException - Never.

testToStringWithChildren

public void testToStringWithChildren()
                              throws AbstractGraphException
Test a node with children.

Throws:
AbstractGraphException - Never.

testToStringWithParents

public void testToStringWithParents()
                             throws AbstractGraphException
Test a node with parents.

Throws:
AbstractGraphException - Never.

testTransitivity

public void testTransitivity()
                      throws InvalidGraphNodeException
Tests the transitivity of the equals.

Throws:
InvalidGraphNodeException - Never.


Andres Gomez Casanova (AngocA) 2009-2010 Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.