diff options
author | Koushik Dutta <koushd@gmail.com> | 2013-03-24 21:19:48 -0700 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2013-03-24 21:19:48 -0700 |
commit | 5faea2a76900f302f6073a13041386691e1db5ec (patch) | |
tree | d73d7e1cbdd232766db0f4af5ab7fc17385d4696 /AndroidAsyncTest | |
parent | fff9c44b2e5324fcfc6b85431bf981f5787bfd1e (diff) | |
download | AndroidAsync-5faea2a76900f302f6073a13041386691e1db5ec.tar.gz AndroidAsync-5faea2a76900f302f6073a13041386691e1db5ec.tar.bz2 AndroidAsync-5faea2a76900f302f6073a13041386691e1db5ec.zip |
add hello world string test
Diffstat (limited to 'AndroidAsyncTest')
-rw-r--r-- | AndroidAsyncTest/src/com/koushikdutta/async/test/HttpClientTests.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/AndroidAsyncTest/src/com/koushikdutta/async/test/HttpClientTests.java b/AndroidAsyncTest/src/com/koushikdutta/async/test/HttpClientTests.java index 6f34e7e..ef6af56 100644 --- a/AndroidAsyncTest/src/com/koushikdutta/async/test/HttpClientTests.java +++ b/AndroidAsyncTest/src/com/koushikdutta/async/test/HttpClientTests.java @@ -81,6 +81,11 @@ public class HttpClientTests extends TestCase { assertTrue(md5.digest().equals(dataNameAndHash)); } + public void testGithubHelloWithFuture() throws Exception { + Future<String> string = client.get("https://" + githubPath + "hello.txt", (StringCallback)null); + assertEquals(string.get(TIMEOUT, TimeUnit.MILLISECONDS), "hello world"); + } + public void testCache() throws Exception { ResponseCacheMiddleware cache = ResponseCacheMiddleware.addCache(client, new File(Environment.getExternalStorageDirectory(), "AndroidAsyncTest"), 1024 * 1024 * 10); try { |