Преглед на файлове

Merge pull request #3890 from nextcloud/deleteTests

Delete old tests
Andy Scherzinger преди 6 години
родител
ревизия
82fc476962

+ 0 - 10
tests/.classpath

@@ -1,10 +0,0 @@
-<?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 exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
-	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
-	<classpathentry kind="output" path="bin/classes"/>
-</classpath>

+ 0 - 34
tests/.project

@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>owncloud-android-tests</name>
-	<comment></comment>
-	<projects>
-		<project>owncloud-android</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>

+ 0 - 16
tests/.settings/org.eclipse.jdt.core.prefs

@@ -1,16 +0,0 @@
-eclipse.preferences.version=1
-<<<<<<< HEAD
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-=======
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
->>>>>>> develop
-org.eclipse.jdt.core.compiler.source=1.6

+ 0 - 21
tests/AndroidManifest.xml

@@ -1,21 +0,0 @@
-<?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">
-    <!-- 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>

+ 0 - 18
tests/ant.properties

@@ -1,18 +0,0 @@
-# This file is used to override default values used by the Ant build system.
-#
-# This file must be checked into Version Control Systems, as it is
-# integral to the build system of your project.
-
-# This file is only used by the Ant script.
-
-# You can use this to override default values such as
-#  'source.dir' for the location of your java source folder and
-#  'out.dir' for the location of your output folder.
-
-# You can also use it define how the release builds are signed by declaring
-# the following properties:
-#  'key.store' for the location of your keystore and
-#  'key.alias' for the name of the key to use.
-# The password will be asked during the build when you use the 'release' target.
-
-tested.project.dir=..

+ 0 - 20
tests/proguard-project.txt

@@ -1,20 +0,0 @@
-# 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 *;
-#}

+ 0 - 14
tests/project.properties

@@ -1,14 +0,0 @@
-# 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-24

BIN
tests/res/drawable-hdpi/ic_launcher.png


BIN
tests/res/drawable-ldpi/ic_launcher.png


BIN
tests/res/drawable-mdpi/ic_launcher.png


BIN
tests/res/drawable-xhdpi/ic_launcher.png


+ 0 - 6
tests/res/values/strings.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
-    <string name="app_name">Owncloud-android-testsTest</string>
-
-</resources>

+ 0 - 62
tests/src/com/owncloud/android/test/AccountUtilsTest.java

@@ -1,62 +0,0 @@
-/**
- *   ownCloud Android client application
- *
- *   Copyright (C) 2012  Bartek Przybylski
- *   Copyright (C) 2015 ownCloud Inc.
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License version 2,
- *   as published by the Free Software Foundation.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package com.owncloud.android.test;
-
-import com.owncloud.android.lib.common.accounts.AccountUtils;
-import com.owncloud.android.lib.resources.status.OwnCloudVersion;
-
-import android.test.AndroidTestCase;
-
-
-public class AccountUtilsTest extends AndroidTestCase {
-    
-    public void testGetWebdavPathAndOCVersion() {
-        OwnCloudVersion ocv12 = new OwnCloudVersion(0x010200);
-        OwnCloudVersion ocv12s = new OwnCloudVersion("1.2");
-        OwnCloudVersion ocv22 = new OwnCloudVersion(0x020200);
-        OwnCloudVersion ocv30 = new OwnCloudVersion(0x030000);
-        OwnCloudVersion ocv33s = new OwnCloudVersion("3.3.3");
-        OwnCloudVersion ocv45 = new OwnCloudVersion(0x040500);
-        OwnCloudVersion ocv70 = new OwnCloudVersion(0x070000);
-
-        assertTrue(AccountUtils.getWebdavPath(ocv12, false, false).equals("/webdav/owncloud.php"));
-        assertTrue(AccountUtils.getWebdavPath(ocv12s, false, false).equals("/webdav/owncloud.php"));
-        assertTrue(AccountUtils.getWebdavPath(ocv22, false, false).equals("/files/webdav.php"));
-        assertTrue(AccountUtils.getWebdavPath(ocv30,false, false).equals("/files/webdav.php"));
-        assertTrue(AccountUtils.getWebdavPath(ocv33s, false, false).equals("/files/webdav.php"));
-        assertTrue(AccountUtils.getWebdavPath(ocv45, false, false).equals("/remote.php/webdav"));
-        assertTrue(AccountUtils.getWebdavPath(ocv70, false, false).equals("/remote.php/webdav"));
-        assertNull(AccountUtils.getWebdavPath(null, false, false));
-        assertTrue(AccountUtils.getWebdavPath(ocv12, true, false).equals("/remote.php/odav"));
-        assertTrue(AccountUtils.getWebdavPath(ocv12s, true, false).equals("/remote.php/odav"));
-        assertTrue(AccountUtils.getWebdavPath(ocv22, true, false).equals("/remote.php/odav"));
-        assertTrue(AccountUtils.getWebdavPath(ocv30, true, false).equals("/remote.php/odav"));
-        assertTrue(AccountUtils.getWebdavPath(ocv33s, true, false).equals("/remote.php/odav"));
-        assertTrue(AccountUtils.getWebdavPath(ocv45, true, false).equals("/remote.php/odav"));
-        assertTrue(AccountUtils.getWebdavPath(ocv70, true, false).equals("/remote.php/odav"));
-
-        OwnCloudVersion invalidVer = new OwnCloudVersion("a.b.c");
-        assertFalse(invalidVer.isVersionValid());
-
-        assertTrue(ocv45.toString().equals("4.5.0"));
-    }
-
-}

+ 0 - 53
tests/src/com/owncloud/android/test/FileContentProviderTest.java

@@ -1,53 +0,0 @@
-package com.owncloud.android.test;
-
-import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
-import com.owncloud.android.providers.FileContentProvider;
-import android.annotation.TargetApi;
-import android.net.Uri;
-import android.os.Build;
-import android.test.ProviderTestCase2;
-import android.test.mock.MockContentResolver;
-import android.util.Log;
-
-@TargetApi(Build.VERSION_CODES.CUPCAKE)
-public class FileContentProviderTest extends ProviderTestCase2<FileContentProvider> {
-
-	private static final String TAG = FileContentProvider.class.getName();
-	
-	private static MockContentResolver resolve;
-	
-	public FileContentProviderTest(Class<FileContentProvider> providerClass,
-			String providerAuthority) {
-		super(providerClass, providerAuthority);
-		// TODO Auto-generated constructor stub
-	}
-	
-	public FileContentProviderTest() {
-		super(FileContentProvider.class, "com.owncloud.android.providers.FileContentProvider");	
-	}
-	
-	@Override
-	public void setUp() {
-		Log.i(TAG, "Entered setup");
-		try {
-			super.setUp();
-			resolve = this.getMockContentResolver();
-		} catch (Exception e) {
-			
-		}
-	}
-	
-	public void testGetTypeFile() {
-		Uri testuri = Uri.parse("content://org.owncloud/file/");
-		assertEquals(ProviderTableMeta.CONTENT_TYPE_ITEM, resolve.getType(testuri));
-
-		testuri = Uri.parse("content://org.owncloud/file/123");
-		assertEquals(ProviderTableMeta.CONTENT_TYPE_ITEM, resolve.getType(testuri));
-	}
-	
-	public void testGetTypeRoot() {
-		Uri testuri = Uri.parse("content://org.owncloud/");
-		assertEquals(ProviderTableMeta.CONTENT_TYPE, resolve.getType(testuri));
-	}
-
-}