Skip to content

Commit

Permalink
[inputoutput] Fixing unit tests that depends on an internet connection.
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Jun 2, 2018
1 parent 30ebc6c commit 2b182be
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,12 @@ public void addURL() throws Exception {
assertEquals(new URL("http://www.arakhne.org"), e.getURL()); //$NON-NLS-1$
assertNull(e.getFile());
assertNull(e.getEmbeddedData());
assertEquals(MimeName.MIME_HTML.getMimeConstant(), e.getMimeType());
// If internet connection is up, is should be HTML mime type.
// Otherwise it should be Octet-stream.
String type = e.getMimeType();
assertTrue(
type.equals(MimeName.MIME_HTML.getMimeConstant())
|| type.equals(MimeName.MIME_OCTET_STREAM.getMimeConstant()));
}

@Test
Expand Down

0 comments on commit 2b182be

Please sign in to comment.