JML

org.jmlspecs.samples.list.list3
Class E_OneWayList_JML_Test.OneTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.jmlspecs.samples.list.list3.E_OneWayList_JML_TestData
              extended byorg.jmlspecs.samples.list.list3.E_OneWayList_JML_Test
                  extended byorg.jmlspecs.samples.list.list3.E_OneWayList_JML_Test.OneTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
E_OneWayList_JML_Test.TestAppend, E_OneWayList_JML_Test.TestClone, E_OneWayList_JML_Test.TestE_OneWayList, E_OneWayList_JML_Test.TestEquals, E_OneWayList_JML_Test.TestFirstEntry, E_OneWayList_JML_Test.TestGetEntry, E_OneWayList_JML_Test.TestHashCode, E_OneWayList_JML_Test.TestIncrementCursor, E_OneWayList_JML_Test.TestInsertAfterCursor, E_OneWayList_JML_Test.TestInsertBeforeCursor, E_OneWayList_JML_Test.TestIsEmpty, E_OneWayList_JML_Test.TestIsOffEnd, E_OneWayList_JML_Test.TestIsOffFront, E_OneWayList_JML_Test.TestLength, E_OneWayList_JML_Test.TestRemoveAllEntries, E_OneWayList_JML_Test.TestRemoveEntry, E_OneWayList_JML_Test.TestReplaceEntry, E_OneWayList_JML_Test.TestToString
Enclosing class:
E_OneWayList_JML_Test

protected static abstract class E_OneWayList_JML_Test.OneTest
extends E_OneWayList_JML_Test

A JUnit test object that can run a single test method. This is defined as a nested class solely for convenience; it can't be defined once and for all because it must subclass its enclosing class.


Nested Class Summary
 
Nested classes inherited from class org.jmlspecs.samples.list.list3.E_OneWayList_JML_Test
E_OneWayList_JML_Test.OneTest, E_OneWayList_JML_Test.TestAppend, E_OneWayList_JML_Test.TestClone, E_OneWayList_JML_Test.TestE_OneWayList, E_OneWayList_JML_Test.TestEquals, E_OneWayList_JML_Test.TestFirstEntry, E_OneWayList_JML_Test.TestGetEntry, E_OneWayList_JML_Test.TestHashCode, E_OneWayList_JML_Test.TestIncrementCursor, E_OneWayList_JML_Test.TestInsertAfterCursor, E_OneWayList_JML_Test.TestInsertBeforeCursor, E_OneWayList_JML_Test.TestIsEmpty, E_OneWayList_JML_Test.TestIsOffEnd, E_OneWayList_JML_Test.TestIsOffFront, E_OneWayList_JML_Test.TestLength, E_OneWayList_JML_Test.TestRemoveAllEntries, E_OneWayList_JML_Test.TestRemoveEntry, E_OneWayList_JML_Test.TestReplaceEntry, E_OneWayList_JML_Test.TestToString
 
Field Summary
protected  junit.framework.TestResult result
          The result object that holds information about testing.
 
Fields inherited from class org.jmlspecs.samples.list.list3.E_OneWayList_JML_TestData
first, fourth, second, third
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
E_OneWayList_JML_Test.OneTest(String name)
          Initialize this test object.
 
Method Summary
private  void addMeaningless()
          Inform listeners that a meaningless test was run.
protected abstract  void doCall()
          Call the method to be tested with the appropriate arguments.
protected abstract  String failMessage(JMLAssertionError e)
          Format the error message for a test failure, based on the method's arguments.
 void run(junit.framework.TestResult result)
           
 void runTest()
           
 
Methods inherited from class org.jmlspecs.samples.list.list3.E_OneWayList_JML_Test
addTestSuiteForEachMethod, charToString, main, suite
 
Methods inherited from class org.jmlspecs.samples.list.list3.E_OneWayList_JML_TestData
emptyTestSuiteFor, overallTestSuite, vjava_lang_ObjectIter, vorg_jmlspecs_samples_list_list3_E_OneWayListIter
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, 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
 

Field Detail

result

protected junit.framework.TestResult result
The result object that holds information about testing.

Constructor Detail

E_OneWayList_JML_Test.OneTest

public E_OneWayList_JML_Test.OneTest(String name)
Initialize this test object.

Method Detail

run

public void run(junit.framework.TestResult result)
Specified by:
run in interface junit.framework.Test
Overrides:
run in class junit.framework.TestCase

runTest

public void runTest()
             throws Throwable
Overrides:
runTest in class junit.framework.TestCase
Throws:
Throwable

doCall

protected abstract void doCall()
                        throws Throwable
Call the method to be tested with the appropriate arguments.

Throws:
Throwable

failMessage

protected abstract String failMessage(JMLAssertionError e)
Format the error message for a test failure, based on the method's arguments.


addMeaningless

private void addMeaningless()
Inform listeners that a meaningless test was run.


JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.