Skip to content

Commit

Permalink
Clean out the tests directory a bit removing deps on some 3rd party l…
Browse files Browse the repository at this point in the history
…ibraries in the tests.

Update issue 7
  • Loading branch information
jlapenna committed Sep 27, 2009
1 parent deee917 commit e07002c
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 286 deletions.
2 changes: 0 additions & 2 deletions tests/.classpath
Expand Up @@ -4,7 +4,5 @@
<classpathentry kind="src" path="gen"/>
<classpathentry combineaccessrules="false" kind="src" path="/foursquared"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="lib" path="/foursquared/lib/signpost-commonshttp.jar"/>
<classpathentry kind="lib" path="/foursquared/lib/signpost-core.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions tests/.project
Expand Up @@ -3,6 +3,7 @@
<name>foursquared_tests</name>
<comment></comment>
<projects>
<project>foursquared</project>
</projects>
<buildSpec>
<buildCommand>
Expand Down
33 changes: 8 additions & 25 deletions tests/AndroidManifest.xml
@@ -1,35 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.joelapenna.foursquared.tests"
android:versionName="2009-07-04"
android:versionCode="2009070400">

<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission
android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.READ_PHONE_STATE" />

<uses-sdk
android:minSdkVersion="3" />

package="com.joelapenna.foursquared.test"
android:versionName="2009-09-26"
android:versionCode="2009092600">
<application
android:name="Foursquared">
android:label="@string/app_name">

<uses-library
android:name="android.test.runner" />

<uses-library
android:name="com.google.android.maps" />

</application>

<uses-sdk
android:minSdkVersion="3" />
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.joelapenna.foursquared">
</instrumentation>
android:targetPackage="com.joelapenna.foursquared"
android:name="android.test.InstrumentationTestRunner" />
</manifest>
13 changes: 1 addition & 12 deletions tests/default.properties
Expand Up @@ -7,16 +7,5 @@
# "build.properties", and override values to adapt the script to your
# project structure.

# apk configurations. This property allows creation of APK files with limited
# resources. For example, if your application contains many locales and
# you wish to release multiple smaller apks instead of a large one, you can
# define configuration to create apks with limited language sets.
# Format is a comma separated list of configuration names. For each
# configuration, a property will declare the resource configurations to
# include. Example:
# apk-configurations=european,northamerica
# apk-config-european=en,fr,it,de,es
# apk-config-northamerica=en,es
apk-configurations=
# Project target.
target=Google Inc.:Google APIs:3
target=android-3
12 changes: 12 additions & 0 deletions tests/res/layout/main.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</LinearLayout>
5 changes: 5 additions & 0 deletions tests/res/values/strings.xml
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World!</string>
<string name="app_name">FoursquareTest</string>
</resources>

This file was deleted.

116 changes: 0 additions & 116 deletions tests/src/com/joelapenna/foursquare/FoursquareTestCase.java

This file was deleted.

This file was deleted.

This file was deleted.

Expand Up @@ -2,7 +2,7 @@
* Copyright 2009 Joe LaPenna
*/

package com.joelapenna.foursquared;
package com.joelapenna.foursquared.test;

import com.joelapenna.foursquared.Foursquared;

Expand All @@ -29,7 +29,5 @@ public void testLocationMethods() {
@SmallTest
public void testPreferences() {
createApplication();
Foursquared.getFoursquare();
// ... to be continued.
}
}
Expand Up @@ -2,7 +2,7 @@
* Copyright 2009 Joe LaPenna
*/

package com.joelapenna.foursquared;
package com.joelapenna.foursquared.test;

import com.joelapenna.foursquare.types.Beenhere;
import com.joelapenna.foursquare.types.Group;
Expand Down Expand Up @@ -39,18 +39,6 @@ public static Checkin createCheckin(String id, Venue venue) {
return checkin;
}

public static com.joelapenna.foursquare.types.classic.Checkin createIncomingCheckin() {
com.joelapenna.foursquare.types.classic.Checkin checkin = new com.joelapenna.foursquare.types.classic.Checkin();
checkin.setCheckinid("67889");
checkin.setMessage("OK! We&apos;ve got you @ The Page.");
checkin.setStatus(true);
checkin
.setUrl("http://playfoursquare.com/incoming/breakdown?cid=67889&uid=9232&client=iphone");
checkin.setUserid("9232");
return checkin;

}

public static Group createRandomCheckinGroup(String id) {
Group tlg = new Group();
tlg.setType(id);
Expand Down
Expand Up @@ -2,8 +2,9 @@
* Copyright 2009 Joe LaPenna
*/

package com.joelapenna.foursquared;
package com.joelapenna.foursquared.test;

import com.joelapenna.foursquared.Foursquared;
import com.joelapenna.foursquared.VenueActivity;

import android.content.Intent;
Expand All @@ -23,7 +24,7 @@ public VenueActivityInstrumentationTestCase() {
@SmallTest
public void testOnCreate() {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.putExtra(VenueActivity.EXTRA_VENUE, "40450");
intent.putExtra(Foursquared.EXTRA_VENUE_ID, "40450");
setActivityIntent(intent);

VenueActivity activity = getActivity();
Expand Down

0 comments on commit e07002c

Please sign in to comment.