* Refactor JettyIntegrationTest

* Refactor RxJava samples

* Refactor RxJava samples
This commit is contained in:
Grzegorz Piwowarek
2017-10-09 23:51:39 +02:00
committed by GitHub
parent 0f3df12fed
commit 47783354dd
3 changed files with 60 additions and 43 deletions
@@ -7,7 +7,9 @@ import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import java.nio.charset.StandardCharsets;
@@ -15,17 +17,16 @@ import java.nio.charset.StandardCharsets;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
public class JettyIntegrationTest {
private JettyServer jettyServer;
private static JettyServer jettyServer;
@Before
public void setup() throws Exception {
@BeforeClass
public static void setup() throws Exception {
jettyServer = new JettyServer();
jettyServer.start();
}
@After
public void cleanup() throws Exception {
Thread.sleep(2000);
@AfterClass
public static void cleanup() throws Exception {
jettyServer.stop();
}