gate.fsm
Class TestFSM

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--gate.fsm.TestFSM
All Implemented Interfaces:
junit.framework.Test

public class TestFSM
extends junit.framework.TestCase

JUnit style test code for the gate.fsm package. Unfortunatley it doesn't actually do any testing because of the difficulty to test this kind of stuff. However the main() method runs a visual test that will print the graphs (deterministic and nod-~) resulted form parsing a Jape file. The real functionality of this package is tested in the jape package that make extensive use of the services provided by his package.


Field Summary
private  Batch batch
           
private static boolean DEBUG
          Debug flag
private  MultiPhaseTransducer transducer
           
 
Fields inherited from class junit.framework.TestCase
fName
 
Constructor Summary
TestFSM(String name)
          Construction
 
Method Summary
 void graphTest()
          Will try to parse a .jape file and display the graphs resulted.
static void main(String[] args)
          runs the graphical test
 void setUp()
           
static void showGraph(String title, String gml)
          Opens anew window containing the visual representation of a FSM and having a given title
static junit.framework.Test suite()
          Test suite routine for the test runner
 void tearDown()
           
 void testOne()
          Does some kind of a test that verifies whether parsing the jape file results in a graph.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, name, run, run, runBare, runTest, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail, failNotEquals, failNotSame
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
Debug flag

batch

private Batch batch

transducer

private MultiPhaseTransducer transducer
Constructor Detail

TestFSM

public TestFSM(String name)
Construction
Method Detail

setUp

public void setUp()
           throws JapeException,
                  IOException,
                  GateException
Overrides:
setUp in class junit.framework.TestCase

tearDown

public void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

testOne

public void testOne()
Does some kind of a test that verifies whether parsing the jape file results in a graph. It doesn't check the structure graph.

graphTest

public void graphTest()
               throws IOException,
                      EDU.auburn.VGJ.graph.ParseError
Will try to parse a .jape file and display the graphs resulted.

showGraph

public static void showGraph(String title,
                             String gml)
                      throws IOException,
                             EDU.auburn.VGJ.graph.ParseError
Opens anew window containing the visual representation of a FSM and having a given title

main

public static void main(String[] args)
runs the graphical test

suite

public static junit.framework.Test suite()
Test suite routine for the test runner