org.jomc.sequences.it
Class SequenceDirectoryTest

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

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

Testcase for SequenceDirectory implementations.

Properties

Dependencies

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

Constructor Summary
Constructor and Description
SequenceDirectoryTest()
          Creates a new SequenceDirectoryTest instance.
 
Method Summary
Modifier and Type Method and Description
protected  void clearDirectory()
          Removes all sequences from the directory.
static org.jomc.sequences.Sequence getTestSequence()
          Gets a sequence with valid data.
static void main(String... args)
          Test runner entry point.
 void testAddEditDeleteMany()
          Tests that adding, editing and then removing multiple sequences leaves an empty directory.
 void testAddEditSearchDeleteLegalSequence()
          Tests that a valid sequence can get added, edited, searched and removed.
 void testConcurrentModificationException()
          Tests that a sequence cannot get edited or removed when it got changed concurrently.
 void testIllegalArguments()
          Tests all SequenceDirectory methods to handle illegal arguments correctly by throwing a SequencesSystemException with non-null message.
 void testSequenceExistsException()
          Tests that adding a sequence twice is prevented by throwing a corresponding SequenceExistsException.
 void testSequenceNotFoundException()
          Tests that updating or deleting an unknown sequence is prevented by throwing a corresponding SequenceNotFoundException.
 void testSequenceVetoException()
          Tests that adding an illegal sequence or updating an existing sequence with illegal data is prevented by throwing a corresponding SequenceVetoException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceDirectoryTest

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

Method Detail

getTestSequence

public static org.jomc.sequences.Sequence getTestSequence()
Gets a sequence with valid data.

Returns:
A sequence with valid data.

testIllegalArguments

public void testIllegalArguments()
                          throws Exception
Tests all SequenceDirectory methods to handle illegal arguments correctly by throwing a SequencesSystemException with non-null message.

Throws:
Exception

testAddEditSearchDeleteLegalSequence

public void testAddEditSearchDeleteLegalSequence()
                                          throws Exception
Tests that a valid sequence can get added, edited, searched and removed.

Throws:
Exception

testConcurrentModificationException

public void testConcurrentModificationException()
                                         throws Exception
Tests that a sequence cannot get edited or removed when it got changed concurrently.

Throws:
Exception

testSequenceVetoException

public void testSequenceVetoException()
                               throws Exception
Tests that adding an illegal sequence or updating an existing sequence with illegal data is prevented by throwing a corresponding SequenceVetoException.

Throws:
Exception

testSequenceExistsException

public void testSequenceExistsException()
                                 throws Exception
Tests that adding a sequence twice is prevented by throwing a corresponding SequenceExistsException.

Throws:
Exception

testSequenceNotFoundException

public void testSequenceNotFoundException()
                                   throws Exception
Tests that updating or deleting an unknown sequence is prevented by throwing a corresponding SequenceNotFoundException.

Throws:
Exception

testAddEditDeleteMany

public void testAddEditDeleteMany()
                           throws Exception
Tests that adding, editing and then removing multiple sequences leaves an empty directory.

Throws:
Exception

clearDirectory

protected void clearDirectory()
                       throws Exception
Removes all sequences from the directory.

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.