Commits

Micha Kops  committed 8b6f1c7

First test examples added.

  • Participants
  • Parent commits eaa2605

Comments (0)

Files changed (1)

File src/test/java/com/hascode/tutorial/SomeTest.java

+package com.hascode.tutorial;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
+import com.carrotsearch.junitbenchmarks.BenchmarkRule;
+
+public class SomeTest {
+	@Rule
+	public BenchmarkRule benchmarkRun = new BenchmarkRule();
+
+	@Test
+	public void testSomething() throws Exception {
+		Thread.sleep(200);
+		assertTrue(!false);
+	}
+
+	@BenchmarkOptions(benchmarkRounds = 20, warmupRounds = 10)
+	@Test
+	public void testSomethingOther() throws Exception {
+		Thread.sleep(20);
+		assertTrue(!false);
+	}
+
+}