MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 2 as of 2014-11-02 14:42:27
  • Java
  • JUnit

JUnit

A programmer-oriented testing framework for Java.

http://junit.org/

Annotations

  • @Before , public void setUp(){}
  • @Test , public void textAbc(){}
  • @After , public void tearDown(){}

Imports

   1 import static org.junit.Assert.assertEquals;
   2 import org.junit.Test;
   3 import org.junit.Ignore;
   4 import org.junit.runner.RunWith;
   5 import org.junit.runners.JUnit4;

Inclusion classes

http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html

By default, the Surefire Plugin will automatically include all test classes with the following wildcard patterns:

"**/Test*.java" - includes all of its subdirectories and all java filenames that start with "Test".
"**/*Test.java" - includes all of its subdirectories and all java filenames that end with "Test".
"**/*TestCase.java" - includes all of its subdirectories and all java filenames that end with "TestCase".

Import methods

   1  import static org.junit.Assert.*;
   2   //  ...
   3   assertEquals(...);

Maven dependency

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
</dependency>  
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01