Created
November 11, 2010 08:02
-
-
Save tom/672177 to your computer and use it in GitHub Desktop.
JUnit on SBT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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