let tests run on emulator 2.2

This commit is contained in:
Bartek Przybylski 2012-09-30 14:01:36 +02:00
parent 333514da73
commit 369f2adb50
4 changed files with 23 additions and 24 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<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>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry combineaccessrules="false" kind="src" path="/owncloud-android"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View file

@ -1,19 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.owncloud.android.test"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.owncloud.android" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
<application>
<uses-library android:name="android.test.runner" />
</application>
<!--
This declares that this application uses the instrumentation test runner targeting
the package of com.owncloud.android.test. To run the tests use the command:
"adb shell am instrument -w com.owncloud.android.tests/android.test.InstrumentationTestRunner"
-->
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.owncloud.android"
android:label="Tests for com.owncloud.android"/>
</manifest>

View file

@ -1,15 +1,12 @@
package com.owncloud.android.test;
import org.junit.Test;
import android.test.AndroidTestCase;
import com.owncloud.android.AccountUtils;
import com.owncloud.android.utils.OwnCloudVersion;
import junit.framework.TestCase;
public class AccountUtilsTest extends AndroidTestCase {
public class AccountUtilsTest extends TestCase {
@Test
public void testGetWebdavPath() {
OwnCloudVersion ocv12 = new OwnCloudVersion(0x010200);
OwnCloudVersion ocv22 = new OwnCloudVersion(0x020200);