Skip to content

Instantly share code, notes, and snippets.

@cb372
Created February 23, 2012 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cb372/1888802 to your computer and use it in GitHub Desktop.
Save cb372/1888802 to your computer and use it in GitHub Desktop.
Maven + JUnit example
// put this file in src/test/java/foo/
package foo;
import org.junit.Test;
import org.junit.Assert;
import static org.junit.Assert.assertTrue;
public class MyTest {
@Test
public void shouldDoSomeAsserting() {
assertTrue(false);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>junit-example</artifactId>
<version>0.1-SNAPSHOT</version>
<name>Maven + JUnit example</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment