diff options
author | Koushik Dutta <koushd@gmail.com> | 2013-03-24 20:33:14 -0700 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2013-03-24 20:33:14 -0700 |
commit | 2b2cd8af8713466c2694a526ccd9cfa23cb966c5 (patch) | |
tree | c295d00152b8fe5530832b4ffc88cbd4718454e1 /AndroidAsyncTest | |
parent | e9de9b4e6bbbeeaa17029ea2d72d6eb83357521a (diff) | |
download | AndroidAsync-2b2cd8af8713466c2694a526ccd9cfa23cb966c5.tar.gz AndroidAsync-2b2cd8af8713466c2694a526ccd9cfa23cb966c5.tar.bz2 AndroidAsync-2b2cd8af8713466c2694a526ccd9cfa23cb966c5.zip |
move
Diffstat (limited to 'AndroidAsyncTest')
-rw-r--r-- | AndroidAsyncTest/.classpath | 9 | ||||
-rw-r--r-- | AndroidAsyncTest/.project | 34 | ||||
-rw-r--r-- | AndroidAsyncTest/AndroidManifest.xml | 19 | ||||
-rw-r--r-- | AndroidAsyncTest/gen/com/koushikdutta/async/test/BuildConfig.java | 6 | ||||
-rw-r--r-- | AndroidAsyncTest/gen/com/koushikdutta/async/test/R.java | 19 | ||||
-rw-r--r-- | AndroidAsyncTest/proguard-project.txt | 20 | ||||
-rw-r--r-- | AndroidAsyncTest/project.properties | 14 | ||||
-rw-r--r-- | AndroidAsyncTest/res/drawable-hdpi/ic_launcher.png | bin | 0 -> 9397 bytes | |||
-rw-r--r-- | AndroidAsyncTest/res/drawable-ldpi/ic_launcher.png | bin | 0 -> 2729 bytes | |||
-rw-r--r-- | AndroidAsyncTest/res/drawable-mdpi/ic_launcher.png | bin | 0 -> 5237 bytes | |||
-rw-r--r-- | AndroidAsyncTest/res/drawable-xhdpi/ic_launcher.png | bin | 0 -> 14383 bytes | |||
-rw-r--r-- | AndroidAsyncTest/res/values/strings.xml | 6 | ||||
-rw-r--r-- | AndroidAsyncTest/src/com/koushikdutta/async/test/GoogleTest.java | 22 | ||||
-rw-r--r-- | AndroidAsyncTest/testdata/6691924d7d24237d3b3679310157d640 | bin | 0 -> 100000 bytes |
14 files changed, 149 insertions, 0 deletions
diff --git a/AndroidAsyncTest/.classpath b/AndroidAsyncTest/.classpath new file mode 100644 index 0000000..653dc7f --- /dev/null +++ b/AndroidAsyncTest/.classpath @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry combineaccessrules="false" kind="src" path="/AndroidAsyncSample"/> + <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> + <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="gen"/> + <classpathentry kind="output" path="bin/classes"/> +</classpath> diff --git a/AndroidAsyncTest/.project b/AndroidAsyncTest/.project new file mode 100644 index 0000000..379c28d --- /dev/null +++ b/AndroidAsyncTest/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>AndroidAsyncTest</name> + <comment></comment> + <projects> + <project>AndroidAsyncSample</project> + </projects> + <buildSpec> + <buildCommand> + <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>com.android.ide.eclipse.adt.ApkBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>com.android.ide.eclipse.adt.AndroidNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/AndroidAsyncTest/AndroidManifest.xml b/AndroidAsyncTest/AndroidManifest.xml new file mode 100644 index 0000000..37840e6 --- /dev/null +++ b/AndroidAsyncTest/AndroidManifest.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.koushikdutta.async.test" + android:versionCode="1" + android:versionName="1.0" > + + <uses-sdk android:minSdkVersion="8" /> + + <instrumentation + android:name="android.test.InstrumentationTestRunner" + android:targetPackage="com.koushikdutta.async.sample" /> + + <application + android:icon="@drawable/ic_launcher" + android:label="@string/app_name" > + <uses-library android:name="android.test.runner" /> + </application> + +</manifest>
\ No newline at end of file diff --git a/AndroidAsyncTest/gen/com/koushikdutta/async/test/BuildConfig.java b/AndroidAsyncTest/gen/com/koushikdutta/async/test/BuildConfig.java new file mode 100644 index 0000000..b92f35f --- /dev/null +++ b/AndroidAsyncTest/gen/com/koushikdutta/async/test/BuildConfig.java @@ -0,0 +1,6 @@ +/** Automatically generated file. DO NOT MODIFY */ +package com.koushikdutta.async.test; + +public final class BuildConfig { + public final static boolean DEBUG = true; +}
\ No newline at end of file diff --git a/AndroidAsyncTest/gen/com/koushikdutta/async/test/R.java b/AndroidAsyncTest/gen/com/koushikdutta/async/test/R.java new file mode 100644 index 0000000..3ed3fee --- /dev/null +++ b/AndroidAsyncTest/gen/com/koushikdutta/async/test/R.java @@ -0,0 +1,19 @@ +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package com.koushikdutta.async.test; + +public final class R { + public static final class attr { + } + public static final class drawable { + public static final int ic_launcher=0x7f020000; + } + public static final class string { + public static final int app_name=0x7f030000; + } +} diff --git a/AndroidAsyncTest/proguard-project.txt b/AndroidAsyncTest/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/AndroidAsyncTest/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/AndroidAsyncTest/project.properties b/AndroidAsyncTest/project.properties new file mode 100644 index 0000000..a3ee5ab --- /dev/null +++ b/AndroidAsyncTest/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-17 diff --git a/AndroidAsyncTest/res/drawable-hdpi/ic_launcher.png b/AndroidAsyncTest/res/drawable-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..96a442e --- /dev/null +++ b/AndroidAsyncTest/res/drawable-hdpi/ic_launcher.png diff --git a/AndroidAsyncTest/res/drawable-ldpi/ic_launcher.png b/AndroidAsyncTest/res/drawable-ldpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..9923872 --- /dev/null +++ b/AndroidAsyncTest/res/drawable-ldpi/ic_launcher.png diff --git a/AndroidAsyncTest/res/drawable-mdpi/ic_launcher.png b/AndroidAsyncTest/res/drawable-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..359047d --- /dev/null +++ b/AndroidAsyncTest/res/drawable-mdpi/ic_launcher.png diff --git a/AndroidAsyncTest/res/drawable-xhdpi/ic_launcher.png b/AndroidAsyncTest/res/drawable-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..71c6d76 --- /dev/null +++ b/AndroidAsyncTest/res/drawable-xhdpi/ic_launcher.png diff --git a/AndroidAsyncTest/res/values/strings.xml b/AndroidAsyncTest/res/values/strings.xml new file mode 100644 index 0000000..ef0d9f7 --- /dev/null +++ b/AndroidAsyncTest/res/values/strings.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <string name="app_name">AndroidAsyncTestTest</string> + +</resources>
\ No newline at end of file diff --git a/AndroidAsyncTest/src/com/koushikdutta/async/test/GoogleTest.java b/AndroidAsyncTest/src/com/koushikdutta/async/test/GoogleTest.java new file mode 100644 index 0000000..7368596 --- /dev/null +++ b/AndroidAsyncTest/src/com/koushikdutta/async/test/GoogleTest.java @@ -0,0 +1,22 @@ +package com.koushikdutta.async.test; + +import java.util.concurrent.TimeUnit; + +import junit.framework.TestCase; + +import com.koushikdutta.async.future.Future; +import com.koushikdutta.async.http.AsyncHttpClient; +import com.koushikdutta.async.http.AsyncHttpClient.StringCallback; + +public class GoogleTest extends TestCase { + public void testHomepage() throws Exception { + AsyncHttpClient client = AsyncHttpClient.getDefaultInstance(); + + Future<String> ret = client.get("http://google.com", (StringCallback)null); + assertNotNull(ret.get(5000, TimeUnit.MILLISECONDS)); + } + + public void testGithubRandomData() { + String dataNameAndHash = "6691924d7d24237d3b3679310157d640"; + } +} diff --git a/AndroidAsyncTest/testdata/6691924d7d24237d3b3679310157d640 b/AndroidAsyncTest/testdata/6691924d7d24237d3b3679310157d640 Binary files differnew file mode 100644 index 0000000..cdd924a --- /dev/null +++ b/AndroidAsyncTest/testdata/6691924d7d24237d3b3679310157d640 |