Permalink
Browse files

Add scripted test for #14

  • Loading branch information...
Jeff Wright Jeff Wright
Jeff Wright authored and Jeff Wright committed Jul 11, 2014
1 parent 737f79f commit 2f5a46ff9ff92e891fc159a794174d66b239a2ff
@@ -0,0 +1,7 @@
name := """tests-run-once"""
scalaVersion := "2.10.2"
libraryDependencies += "com.novocode" % "junit-interface" % sys.props("project.version") % "test"
fork in Test := true
@@ -0,0 +1,18 @@
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.BlockJUnit4ClassRunner;
public class MyTest extends SuperclassTests {
private static int testRuns = 0;
@Test
public void simpleCheck() {
System.out.println("hello" + testRuns);
testRuns++;
Assert.assertEquals(1, testRuns);
}
}
@@ -0,0 +1,9 @@
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.BlockJUnit4ClassRunner;
@RunWith(BlockJUnit4ClassRunner.class)
public abstract class SuperclassTests {
}
@@ -0,0 +1,2 @@
# verify that tests run once
> test

0 comments on commit 2f5a46f

Please sign in to comment.