Class InclassMethodTest


  • public class InclassMethodTest
    extends java.lang.Object
    Encapsulate a method (annotated with TestMethod) in a JUnit test.
    Author:
    Dirk Fahland
    • Constructor Summary

      Constructors 
      Constructor Description
      InclassMethodTest​(java.lang.reflect.Method method, java.lang.String testFileRoot)
      Encapsulate the given method (annotated with TestMethod) in a JUnit test.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void test()
      Invokes the method annotated with TestMethod and compares the result with an expected value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • InclassMethodTest

        public InclassMethodTest​(java.lang.reflect.Method method,
                                 java.lang.String testFileRoot)
        Encapsulate the given method (annotated with TestMethod) in a JUnit test. When executed, the test may access files stored at testFileRoot.
        Parameters:
        method -
        testFileRoot -
    • Method Detail

      • test

        public void test()
                  throws java.lang.Throwable
        Invokes the method annotated with TestMethod and compares the result with an expected value. Comparison is done using Assert.assertEquals(String, String, String)
        Throws:
        java.lang.Throwable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object