Skip to content

Instantly share code, notes, and snippets.

@tom
Created November 11, 2010 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tom/672177 to your computer and use it in GitHub Desktop.
Save tom/672177 to your computer and use it in GitHub Desktop.
JUnit on SBT
Bar.scala
import org.junit.{Ignore, Test}
import org.scalatest.junit.JUnitSuite
import org.junit.Assert._
import org.hamcrest.CoreMatchers._
class Bar extends JUnitSuite {
@Test
@Ignore
def isTrue(): Unit = {
assertThat(true, is(true))
}
}
FooTest.java
import org.junit.Test;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class FooTest extends Bar {
@Test
public void shouldBeEqual() {
assertThat("Foo", is(equalTo("Foo")));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment