Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "User:Michael.norman.oracle.com/Info on JUnit4"

(New page: == Information on JUnit4 ==)
 
(Information on JUnit4)
Line 1: Line 1:
 
== Information on JUnit4 ==
 
== Information on JUnit4 ==
 +
 +
* successor to most widely used unit-testing framework for Java, JUnit3
 +
* under active development (last JUnit3 release 3.8.2 2006-03-03)
 +
** JUnit 4 released 2006-02-16
 +
*** 4.1 2006-04-27
 +
*** 4.2 2006-11-16
 +
*** 4.3 2006-11-16
 +
**** 4.3.1 2007-03-28
 +
*** 4.4 (current as of 071204) 2007-03-28
 +
* based on Java 5 annotations:
 +
<font color="#000000">'''<font color="#7f0055">
 +
<del>import</del></font>'''<font color="#7f0055"> junit</font><font color="#7f0055">.</font><font color="#7f0055">framework</font><font color="#7f0055">.</font><font color="#7f0055">TestCase</font><font color="#7f0055"><nowiki>;</nowiki></font>
 +
'''<font color="#7f0055">import</font>'''<font color="#7f0055"> org</font><font color="#7f0055">.</font><font color="#7f0055">junit</font><font color="#7f0055">.</font><font color="#7f0055">Test</font><font color="#7f0055"><nowiki>;</nowiki></font>
 +
 +
'''<font color="#7f0055">public</font>''' '''<font color="#7f0055">class</font>''' CalculatorTest '''<font color="#7f0055"><del>extends</del></font>''' TestCase {
 +
 +
    @Test
 +
    '''<font color="#7f0055">public</font>''' '''<font color="#7f0055">void</font>''' <del>test</del>add() {
 +
        ....
 +
    }
 +
}
 +
</font>

Revision as of 14:47, 4 December 2007

Information on JUnit4

  • successor to most widely used unit-testing framework for Java, JUnit3
  • under active development (last JUnit3 release 3.8.2 2006-03-03)
    • JUnit 4 released 2006-02-16
      • 4.1 2006-04-27
      • 4.2 2006-11-16
      • 4.3 2006-11-16
        • 4.3.1 2007-03-28
      • 4.4 (current as of 071204) 2007-03-28
  • based on Java 5 annotations:

import junit.framework.TestCase;
import org.junit.Test;

public class CalculatorTest extends TestCase {

    @Test
    public void testadd() { 
        ....
    } 
}

Back to the top