name.angoca.db2sa.grammarReader.impl.xml
Class ImplementationXMLGrammarReaderTest

Package class diagram package ImplementationXMLGrammarReaderTest
java.lang.Object
  extended by name.angoca.db2sa.grammarReader.impl.xml.ImplementationXMLGrammarReaderTest

public final class ImplementationXMLGrammarReaderTest
extends Object

Tests for the graph constructor.

Control Version

Version:
1.8.2 2010-05-27
Author:
Andres Gomez Casanova (AngocA)

Constructor Summary
ImplementationXMLGrammarReaderTest()
          Default constructor.
 
Method Summary
 void setUp()
          Clears the configuration file name property before each test.
static void tearDownAfterClass()
          Clears the configuration file name property at the end of the test.
 void testBuildDuplicatedNode()
          Tests a grammar that has a duplicated node.
 void testBuildEmptyFile()
          Tests a grammar that has an empty file.
 void testBuildInvalidStructure()
          Tests a grammar that has an invalid structure.
 void testBuildInverted()
          Tests that a simple graph inverted can be constructed.
 void testBuildNodeNotComeFromStartingNode()
          Tests a grammar that has a node does not come from StartingNode.
 void testBuildNodeNotGoesToEndingNode()
          Tests a grammar that has a node that does not go to EndingNode.
 void testBuildNodeReferencingStartingNode()
          Tests a grammar that has a node that references to StartingNode.
 void testBuildNoEndingNode()
          Tests a grammar that has an ending node.
 void testBuildNoId()
          Tests a grammar that has a node without the id tag.
 void testBuildNoIdNoName()
          Tests a grammar that has a node without the id tag.
 void testBuildNoName()
          Tests a grammar that has a node without the name tag.
 void testBuildNoNodes()
          Tests a grammar that has no nodes.
 void testBuildNoStartingNode()
          Tests a grammar that does not have starting node.
 void testBuildNotAllChildren()
          Tests a grammar that has defined all the nodes that are children.
 void testBuildNotConnectedGraph()
          Tests a grammar that has the starting node is not connected to the ending node.
 void testBuildUnknownStructure()
          Tests a grammar that has a file with an unknown structure.
 void testBuildWithExtraTokens()
          Tests that a simple graph can be constructed with extra tokens.
 void testBuildWithoutExtraTokens()
          Tests that a simple graph can be constructed without extra tokens.
 void testDoubleDelimiters()
          Tests that the configuration file has only one delimiters tag.
 void testEmptyDelimiters()
          Tests that the configuration file has wrongly defined the delimiters.
 void testEmptyGrammar()
          Tests that the configuration file has only StartingNode and EndingNode.
 void testErrorBuildWithExtraTokens()
          Tests that a simple graph is different with and without extra tokens.
 void testGrammarFileInDirectory()
          Tests a grammar file in a directory.
 void testGrammarFileInOneDirectory()
          Tests a grammar file that are in a given directory.
 void testGrammarFilesInDirectories()
          Tests a set of grammar files that are in several directories.
 void testGrammarFilesInDirectory()
          Tests a grammar file in a directory.
 void testGrammarFilesInOneDirectory()
          Tests a set of grammar files that are in a given directory.
 void testNoDelimiters()
          Tests that the configuration file has at least one delimiters tag.
 void testNotExistingFile()
          Tests a not existing file as grammar.
 void testNullContent1()
          Tests that the configuration file is null.
 void testNullContent2()
          Tests that the configuration file is null.
 void testNullGraph()
          Tests that a graph cannot be null.
 void testReadNoFileDefined()
          Test the exception thrown when no filename defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImplementationXMLGrammarReaderTest

public ImplementationXMLGrammarReaderTest()
Default constructor.

Method Detail

tearDownAfterClass

public static void tearDownAfterClass()
Clears the configuration file name property at the end of the test.


setUp

public void setUp()
Clears the configuration file name property before each test.


testBuildDuplicatedNode

public void testBuildDuplicatedNode()
                             throws AbstractDB2SAException
Tests a grammar that has a duplicated node.

Throws:
AbstractDB2SAException - Never.

testBuildEmptyFile

public void testBuildEmptyFile()
                        throws AbstractDB2SAException
Tests a grammar that has an empty file.

Throws:
AbstractDB2SAException - Never

testBuildInvalidStructure

public void testBuildInvalidStructure()
                               throws AbstractDB2SAException
Tests a grammar that has an invalid structure.

Throws:
AbstractDB2SAException - Never

testBuildInverted

public void testBuildInverted()
                       throws AbstractDB2SAException
Tests that a simple graph inverted can be constructed.

Throws:
AbstractDB2SAException - Never

testBuildNodeNotComeFromStartingNode

public void testBuildNodeNotComeFromStartingNode()
                                          throws AbstractDB2SAException
Tests a grammar that has a node does not come from StartingNode.

Throws:
AbstractDB2SAException - Never

testBuildNodeNotGoesToEndingNode

public void testBuildNodeNotGoesToEndingNode()
                                      throws AbstractDB2SAException
Tests a grammar that has a node that does not go to EndingNode.

Throws:
AbstractDB2SAException - Never

testBuildNodeReferencingStartingNode

public void testBuildNodeReferencingStartingNode()
                                          throws AbstractDB2SAException
Tests a grammar that has a node that references to StartingNode.

Throws:
AbstractDB2SAException - Never

testBuildNoEndingNode

public void testBuildNoEndingNode()
                           throws AbstractDB2SAException
Tests a grammar that has an ending node.

Throws:
AbstractDB2SAException - Never

testBuildNoId

public void testBuildNoId()
                   throws AbstractDB2SAException
Tests a grammar that has a node without the id tag.

Throws:
AbstractDB2SAException - Never

testBuildNoIdNoName

public void testBuildNoIdNoName()
                         throws AbstractDB2SAException
Tests a grammar that has a node without the id tag.

Throws:
AbstractDB2SAException - Never

testBuildNoName

public void testBuildNoName()
                     throws AbstractDB2SAException
Tests a grammar that has a node without the name tag.

Throws:
AbstractDB2SAException - Never

testBuildNoNodes

public void testBuildNoNodes()
                      throws AbstractDB2SAException
Tests a grammar that has no nodes.

Throws:
AbstractDB2SAException - Never

testBuildNoStartingNode

public void testBuildNoStartingNode()
                             throws AbstractDB2SAException
Tests a grammar that does not have starting node.

Throws:
AbstractDB2SAException - Never

testBuildNotAllChildren

public void testBuildNotAllChildren()
                             throws AbstractDB2SAException
Tests a grammar that has defined all the nodes that are children.

Throws:
AbstractDB2SAException - Never

testBuildNotConnectedGraph

public void testBuildNotConnectedGraph()
                                throws AbstractDB2SAException
Tests a grammar that has the starting node is not connected to the ending node.

Throws:
AbstractDB2SAException - Never

testBuildUnknownStructure

public void testBuildUnknownStructure()
                               throws AbstractDB2SAException
Tests a grammar that has a file with an unknown structure.

Throws:
AbstractDB2SAException - Never

testBuildWithExtraTokens

public void testBuildWithExtraTokens()
                              throws AbstractDB2SAException
Tests that a simple graph can be constructed with extra tokens.

Throws:
AbstractDB2SAException - Never

testBuildWithoutExtraTokens

public void testBuildWithoutExtraTokens()
                                 throws AbstractDB2SAException
Tests that a simple graph can be constructed without extra tokens.

Throws:
AbstractDB2SAException - Never

testDoubleDelimiters

public void testDoubleDelimiters()
                          throws AbstractDB2SAException
Tests that the configuration file has only one delimiters tag.

Throws:
AbstractDB2SAException - Never

testEmptyGrammar

public void testEmptyGrammar()
                      throws AbstractDB2SAException
Tests that the configuration file has only StartingNode and EndingNode.

Throws:
AbstractDB2SAException - Never

testErrorBuildWithExtraTokens

public void testErrorBuildWithExtraTokens()
                                   throws AbstractDB2SAException
Tests that a simple graph is different with and without extra tokens.

Throws:
AbstractDB2SAException - Never

testNoDelimiters

public void testNoDelimiters()
                      throws AbstractDB2SAException
Tests that the configuration file has at least one delimiters tag.

Throws:
AbstractDB2SAException - Never

testEmptyDelimiters

public void testEmptyDelimiters()
                         throws AbstractDB2SAException
Tests that the configuration file has wrongly defined the delimiters.

Throws:
AbstractDB2SAException - Never

testNotExistingFile

public void testNotExistingFile()
                         throws AbstractDB2SAException
Tests a not existing file as grammar.

Throws:
AbstractDB2SAException - Never.

testNullContent1

public void testNullContent1()
                      throws AbstractDB2SAException
Tests that the configuration file is null.

Throws:
AbstractDB2SAException - Never

testNullContent2

public void testNullContent2()
                      throws AbstractDB2SAException
Tests that the configuration file is null.

Throws:
AbstractDB2SAException - Never

testNullGraph

public void testNullGraph()
                   throws AbstractDB2SAException
Tests that a graph cannot be null.

Throws:
AbstractDB2SAException - Never

testReadNoFileDefined

public void testReadNoFileDefined()
                           throws AbstractDB2SAException
Test the exception thrown when no filename defined.

Throws:
AbstractDB2SAException - Never

testGrammarFileInDirectory

public final void testGrammarFileInDirectory()
                                      throws AbstractDB2SAException
Tests a grammar file in a directory.

Throws:
AbstractDB2SAException - Never.

testGrammarFilesInDirectory

public final void testGrammarFilesInDirectory()
                                       throws AbstractDB2SAException
Tests a grammar file in a directory.

Throws:
AbstractDB2SAException - Never.

testGrammarFileInOneDirectory

public final void testGrammarFileInOneDirectory()
                                         throws AbstractDB2SAException
Tests a grammar file that are in a given directory.

Throws:
AbstractDB2SAException - Never.

testGrammarFilesInOneDirectory

public final void testGrammarFilesInOneDirectory()
                                          throws AbstractDB2SAException
Tests a set of grammar files that are in a given directory.

Throws:
AbstractDB2SAException - Never.

testGrammarFilesInDirectories

public final void testGrammarFilesInDirectories()
                                         throws AbstractDB2SAException
Tests a set of grammar files that are in several directories.

Throws:
AbstractDB2SAException - Never.


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