forked from AOL-archive/micro-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleAppTest.java
More file actions
40 lines (26 loc) · 854 Bytes
/
SimpleAppTest.java
File metadata and controls
40 lines (26 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package app1.simple;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import com.aol.micro.server.MicroserverApp;
import com.aol.micro.server.rest.client.nio.AsyncRestClient;
public class SimpleAppTest {
private final AsyncRestClient<String> rest = new AsyncRestClient(1000,1000).withAccept("text/plain");
MicroserverApp server;
@Before
public void startServer(){
server = new MicroserverApp( MicroserverTutorial.class, ()-> "simple");
server.start();
}
@After
public void stopServer(){
server.stop();
}
@Test @Ignore //failing in gradle
public void basicEndPoint(){
assertThat(rest.get("http://localhost:8080/simple/mypath/hello").join(),is("world"));
}
}