jigcell.compare.tests
Class StreamingStringTokenizerTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by jigcell.compare.tests.StreamingStringTokenizerTests
All Implemented Interfaces:
junit.framework.Test

public class StreamingStringTokenizerTests
extends junit.framework.TestCase

A collection of tests to exercise jigcell.compare.impl.StreamingStringTokenizer.

This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.

Author:
Nicholas Allen

Constructor Summary
StreamingStringTokenizerTests(java.lang.String name)
          Creates a new system test.
 
Method Summary
protected  void checkToken(StreamingStringTokenizer tokenizer, java.lang.String token)
          Gets the next token from a tokenizer, trims it, and checks for a match.
static void main(java.lang.String[] args)
          Starts a new test suite run.
static junit.framework.Test suite()
          All of the tests in this test.
 void testEmptyString()
          Test for tokenizing an empty string.
 void testMultipleTokenString()
          Test for tokenizing the complicated time series example string.
 void testOneTokenString()
          Test for tokenizing a one token string.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreamingStringTokenizerTests

public StreamingStringTokenizerTests(java.lang.String name)
Creates a new system test.

Parameters:
name - Test name
Method Detail

main

public static void main(java.lang.String[] args)
Starts a new test suite run.

Parameters:
args - Program arguments

suite

public static junit.framework.Test suite()
All of the tests in this test.


testEmptyString

public void testEmptyString()
                     throws java.lang.Exception
Test for tokenizing an empty string.

Throws:
java.lang.Exception

testMultipleTokenString

public void testMultipleTokenString()
                             throws java.lang.Exception
Test for tokenizing the complicated time series example string.

Throws:
java.lang.Exception

testOneTokenString

public void testOneTokenString()
                        throws java.lang.Exception
Test for tokenizing a one token string.

Throws:
java.lang.Exception

checkToken

protected void checkToken(StreamingStringTokenizer tokenizer,
                          java.lang.String token)
                   throws java.lang.Exception
Gets the next token from a tokenizer, trims it, and checks for a match.

Parameters:
tokenizer - Tokenizer
token - Token
Throws:
java.lang.Exception