org.jomc.sequences.it
Class SequenceOperationsTest

Package class diagram package SequenceOperationsTest
java.lang.Object
  extended by org.jomc.sequences.it.SequenceOperationsTest

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public class SequenceOperationsTest
extends Object

Testcase for SequenceOperations implementations.

Dependencies

Version:
$Id: SequenceOperationsTest.java 2246 2010-06-29 07:59:25Z schulte2005 $
Author:
Christian Schulte 1.0

Constructor Summary
Constructor and Description
SequenceOperationsTest()
          Creates a new SequenceOperationsTest instance.
 
Method Summary
Modifier and Type Method and Description
static void main(String... args)
          Test runner entry point.
 void testIllegalArguments()
          Tests the SequenceOperations.getNextSequenceValue(String) and SequenceOperations.getNextSequenceValues(String,int) methods to handle illegal arguments correctly by throwing a SequencesSystemException with non-null message.
 void testSequenceLimitException()
          Tests the SequenceOperations.getNextSequenceValue(java.lang.String) and SequenceOperations.getNextSequenceValues(java.lang.String, int) methods to throw a SequenceLimitException when a maximum value is reached.
 void testSequenceNotFoundException()
          Tests that requesting sequence values for unknown sequences is prevented by throwing a corresponding SequenceNotFoundException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceOperationsTest

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public SequenceOperationsTest()
Creates a new SequenceOperationsTest instance.

Method Detail

testIllegalArguments

public void testIllegalArguments()
                          throws Exception
Tests the SequenceOperations.getNextSequenceValue(String) and SequenceOperations.getNextSequenceValues(String,int) methods to handle illegal arguments correctly by throwing a SequencesSystemException with non-null message.

Throws:
Exception

testSequenceNotFoundException

public void testSequenceNotFoundException()
                                   throws Exception
Tests that requesting sequence values for unknown sequences is prevented by throwing a corresponding SequenceNotFoundException.

Throws:
Exception

testSequenceLimitException

public void testSequenceLimitException()
                                throws Exception
Tests the SequenceOperations.getNextSequenceValue(java.lang.String) and SequenceOperations.getNextSequenceValues(java.lang.String, int) methods to throw a SequenceLimitException when a maximum value is reached.

Throws:
Exception

main

public static void main(String... args)
Test runner entry point.

This method sets up the JDK's LogManager with properties found at classpath location "/logging.properties" and executes JUnitCore.main(java.lang.String...) passing the given arguments with this classes name prepended.

Parameters:
args - Command line arguments.


Copyright © 2005-2010 The JOMC Project. All Rights Reserved.