Skip to content

Commit

Permalink
fix incorrect tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvergnaud committed Dec 9, 2018
1 parent 9697b65 commit 02f845b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Server/src/test/java/prompto/server/TestCustomHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ public void testInterpret_GET() throws Throwable {
Instance<String> result = new Instance<>();
testInterpret((port)->{
URL url = new URL("http://localhost:" + port + "/ec2/stuff?data=abc&doto=i-efg");
try(InputStream data = url.openStream()) {
Reader reader = new InputStreamReader(data);
BufferedReader buffered = new BufferedReader(reader);
result.set(buffered.readLine());
}
try(InputStream data = url.openStream()) {
Reader reader = new InputStreamReader(data);
BufferedReader buffered = new BufferedReader(reader);
result.set(buffered.readLine());
}
});
assertTrue(result.get().startsWith("received!"));
String out = Out.read();
assertTrue(out.contains("abc"));
assertTrue(out.contains("i-efg"));
});
}

@Test
Expand All @@ -102,8 +102,8 @@ public void testInterpret_POST_JSON() throws Throwable {
}
try(InputStream data = cnx.getInputStream()) {
}
assertTrue(Out.read().endsWith("received!"));
});
assertTrue(Out.read().endsWith("received!"));
}


Expand Down

0 comments on commit 02f845b

Please sign in to comment.