Class AbstractTester<G>

  • Type Parameters:
    G - the type of the test generator required by this tester. An instance of G should somehow provide an instance of the class under test, plus any other information required to parameterize the test.
    All Implemented Interfaces:
    junit.framework.Test
    Direct Known Subclasses:
    AbstractContainerTester, ExampleIteratorTester

    @GwtCompatible
    public class AbstractTester<G>
    extends junit.framework.TestCase
    This abstract base class for testers allows the framework to inject needed information after JUnit constructs the instances.

    This class is emulated in GWT.

    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractTester()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()  
      G getSubjectGenerator()  
      java.lang.String getTestMethodName()
      Returns the name of the test method invoked by this test instance.
      void init​(G subjectGenerator, java.lang.String suiteName)  
      void init​(G subjectGenerator, java.lang.String suiteName, java.lang.Runnable setUp, java.lang.Runnable tearDown)  
      void setUp()  
      void tearDown()  
      • Methods inherited from class junit.framework.TestCase

        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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, run, run, runBare, runTest, setName, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractTester

        public AbstractTester()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Overrides:
        setUp in class junit.framework.TestCase
        Throws:
        java.lang.Exception
      • tearDown

        public void tearDown()
                      throws java.lang.Exception
        Overrides:
        tearDown in class junit.framework.TestCase
        Throws:
        java.lang.Exception
      • init

        public final void init​(G subjectGenerator,
                               java.lang.String suiteName,
                               java.lang.Runnable setUp,
                               java.lang.Runnable tearDown)
      • init

        public final void init​(G subjectGenerator,
                               java.lang.String suiteName)
      • getSubjectGenerator

        public G getSubjectGenerator()
      • getTestMethodName

        public final java.lang.String getTestMethodName()
        Returns the name of the test method invoked by this test instance.
      • getName

        public java.lang.String getName()
        Overrides:
        getName in class junit.framework.TestCase