testing work with JUnit 5

This commit is contained in:
eugenp
2017-02-24 18:04:53 +02:00
parent d67ace8e1e
commit c7c3d822d9
4 changed files with 85 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class IntegrationTestExample2 {
@Test
public void test1a() {
block(3000);
}
@Test
public void test1b() {
block(3000);
}
public static void block(long ms) {
try {
Thread.sleep(ms);
} catch (InterruptedException e) {
System.out.println("Thread Interrupted");
}
}
}