mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-30 09:57:39 +00:00 
			
		
		
		
	Remove OpenForTesting, no longer needed since mockk is used
This commit is contained in:
		
							parent
							
								
									e28ffbac7c
								
							
						
					
					
						commit
						5981dfab96
					
				| @ -1,31 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (C) 2018 The Android Open Source Project |  | ||||||
|  * |  | ||||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); |  | ||||||
|  * you may not use this file except in compliance with the License. |  | ||||||
|  * You may obtain a copy of the License at |  | ||||||
|  * |  | ||||||
|  *      http://www.apache.org/licenses/LICENSE-2.0 |  | ||||||
|  * |  | ||||||
|  * Unless required by applicable law or agreed to in writing, software |  | ||||||
|  * distributed under the License is distributed on an "AS IS" BASIS, |  | ||||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |  | ||||||
|  * See the License for the specific language governing permissions and |  | ||||||
|  * limitations under the License. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package com.owncloud.android.lib.testing |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * This annotation allows us to open some classes for mocking purposes while they are final in |  | ||||||
|  * release builds. |  | ||||||
|  */ |  | ||||||
| @Target(AnnotationTarget.ANNOTATION_CLASS) |  | ||||||
| annotation class OpenClass |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * Annotate a class with [OpenForTesting] if you want it to be extendable in debug builds. |  | ||||||
|  */ |  | ||||||
| @OpenClass |  | ||||||
| @Target(AnnotationTarget.CLASS) |  | ||||||
| annotation class OpenForTesting |  | ||||||
| @ -34,7 +34,6 @@ import com.owncloud.android.lib.common.operations.RemoteOperation | |||||||
| import com.owncloud.android.lib.common.operations.RemoteOperationResult | import com.owncloud.android.lib.common.operations.RemoteOperationResult | ||||||
| import com.owncloud.android.lib.common.utils.Log_OC | import com.owncloud.android.lib.common.utils.Log_OC | ||||||
| import com.owncloud.android.lib.resources.shares.RemoteShare.Companion.INIT_EXPIRATION_DATE_IN_MILLIS | import com.owncloud.android.lib.resources.shares.RemoteShare.Companion.INIT_EXPIRATION_DATE_IN_MILLIS | ||||||
| import com.owncloud.android.lib.testing.OpenForTesting |  | ||||||
| import okhttp3.FormBody | import okhttp3.FormBody | ||||||
| import java.net.URL | import java.net.URL | ||||||
| import java.text.SimpleDateFormat | import java.text.SimpleDateFormat | ||||||
| @ -66,7 +65,6 @@ import java.util.Locale | |||||||
|  * To obtain combinations, add the desired values together. |  * To obtain combinations, add the desired values together. | ||||||
|  * For instance, for Re-Share, delete, read, update, add 16+8+2+1 = 27. |  * For instance, for Re-Share, delete, read, update, add 16+8+2+1 = 27. | ||||||
|  */ |  */ | ||||||
| @OpenForTesting |  | ||||||
| class CreateRemoteShareOperation( | class CreateRemoteShareOperation( | ||||||
|     private val remoteFilePath: String, |     private val remoteFilePath: String, | ||||||
|     private val shareType: ShareType, |     private val shareType: ShareType, | ||||||
|  | |||||||
| @ -33,16 +33,12 @@ import com.owncloud.android.lib.common.http.HttpConstants | |||||||
| import com.owncloud.android.lib.common.http.methods.nonwebdav.GetMethod | import com.owncloud.android.lib.common.http.methods.nonwebdav.GetMethod | ||||||
| import com.owncloud.android.lib.common.operations.RemoteOperation | import com.owncloud.android.lib.common.operations.RemoteOperation | ||||||
| import com.owncloud.android.lib.common.operations.RemoteOperationResult | import com.owncloud.android.lib.common.operations.RemoteOperationResult | ||||||
|  | import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode.OK | ||||||
| import com.owncloud.android.lib.common.utils.Log_OC | import com.owncloud.android.lib.common.utils.Log_OC | ||||||
| 
 |  | ||||||
| import org.json.JSONObject | import org.json.JSONObject | ||||||
| 
 |  | ||||||
| import java.net.URL | import java.net.URL | ||||||
| import java.util.ArrayList | import java.util.ArrayList | ||||||
| 
 | 
 | ||||||
| import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode.OK |  | ||||||
| import com.owncloud.android.lib.testing.OpenForTesting |  | ||||||
| 
 |  | ||||||
| /** | /** | ||||||
|  * Created by masensio on 08/10/2015. |  * Created by masensio on 08/10/2015. | ||||||
|  * |  * | ||||||
| @ -73,7 +69,6 @@ import com.owncloud.android.lib.testing.OpenForTesting | |||||||
|  * @author David A. Velasco |  * @author David A. Velasco | ||||||
|  * @author David González Verdugo |  * @author David González Verdugo | ||||||
|  */ |  */ | ||||||
| @OpenForTesting |  | ||||||
| class GetRemoteShareesOperation | class GetRemoteShareesOperation | ||||||
| /** | /** | ||||||
|  * Constructor |  * Constructor | ||||||
|  | |||||||
| @ -33,7 +33,6 @@ import com.owncloud.android.lib.common.http.methods.nonwebdav.GetMethod | |||||||
| import com.owncloud.android.lib.common.operations.RemoteOperation | import com.owncloud.android.lib.common.operations.RemoteOperation | ||||||
| import com.owncloud.android.lib.common.operations.RemoteOperationResult | import com.owncloud.android.lib.common.operations.RemoteOperationResult | ||||||
| import com.owncloud.android.lib.common.utils.Log_OC | import com.owncloud.android.lib.common.utils.Log_OC | ||||||
| import com.owncloud.android.lib.testing.OpenForTesting |  | ||||||
| import java.net.URL | import java.net.URL | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
| @ -56,7 +55,6 @@ import java.net.URL | |||||||
|  * @param subfiles       If set to false (default), lists only the folder being shared |  * @param subfiles       If set to false (default), lists only the folder being shared | ||||||
|  * If set to true, all shared files within the folder are returned. |  * If set to true, all shared files within the folder are returned. | ||||||
|  */ |  */ | ||||||
| @OpenForTesting |  | ||||||
| class GetRemoteSharesForFileOperation( | class GetRemoteSharesForFileOperation( | ||||||
|     private val remoteFilePath: String, |     private val remoteFilePath: String, | ||||||
|     private val reshares: Boolean, |     private val reshares: Boolean, | ||||||
|  | |||||||
| @ -33,7 +33,6 @@ import com.owncloud.android.lib.common.http.methods.nonwebdav.DeleteMethod | |||||||
| import com.owncloud.android.lib.common.operations.RemoteOperation | import com.owncloud.android.lib.common.operations.RemoteOperation | ||||||
| import com.owncloud.android.lib.common.operations.RemoteOperationResult | import com.owncloud.android.lib.common.operations.RemoteOperationResult | ||||||
| import com.owncloud.android.lib.common.utils.Log_OC | import com.owncloud.android.lib.common.utils.Log_OC | ||||||
| import com.owncloud.android.lib.testing.OpenForTesting |  | ||||||
| import java.net.URL | import java.net.URL | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
| @ -49,7 +48,6 @@ import java.net.URL | |||||||
|  * |  * | ||||||
|  * @param remoteShareId Share ID |  * @param remoteShareId Share ID | ||||||
|  */ |  */ | ||||||
| @OpenForTesting |  | ||||||
| class RemoveRemoteShareOperation(private val remoteShareId: Long) : RemoteOperation<ShareParserResult>() { | class RemoveRemoteShareOperation(private val remoteShareId: Long) : RemoteOperation<ShareParserResult>() { | ||||||
| 
 | 
 | ||||||
|     override fun run(client: OwnCloudClient): RemoteOperationResult<ShareParserResult> { |     override fun run(client: OwnCloudClient): RemoteOperationResult<ShareParserResult> { | ||||||
|  | |||||||
| @ -32,7 +32,6 @@ import com.owncloud.android.lib.common.operations.RemoteOperation | |||||||
| import com.owncloud.android.lib.common.operations.RemoteOperationResult | import com.owncloud.android.lib.common.operations.RemoteOperationResult | ||||||
| import com.owncloud.android.lib.common.utils.Log_OC | import com.owncloud.android.lib.common.utils.Log_OC | ||||||
| import com.owncloud.android.lib.resources.shares.RemoteShare.Companion.DEFAULT_PERMISSION | import com.owncloud.android.lib.resources.shares.RemoteShare.Companion.DEFAULT_PERMISSION | ||||||
| import com.owncloud.android.lib.testing.OpenForTesting |  | ||||||
| import okhttp3.FormBody | import okhttp3.FormBody | ||||||
| import java.net.URL | import java.net.URL | ||||||
| import java.text.SimpleDateFormat | import java.text.SimpleDateFormat | ||||||
| @ -48,7 +47,6 @@ import java.util.Locale | |||||||
|  * @author David A. Velasco |  * @author David A. Velasco | ||||||
|  * @author David González Verdugo |  * @author David González Verdugo | ||||||
|  */ |  */ | ||||||
| @OpenForTesting |  | ||||||
| class UpdateRemoteShareOperation | class UpdateRemoteShareOperation | ||||||
| /** | /** | ||||||
|  * Constructor. No update is initialized by default, need to be applied with setters below. |  * Constructor. No update is initialized by default, need to be applied with setters below. | ||||||
|  | |||||||
| @ -34,7 +34,6 @@ import com.owncloud.android.lib.common.operations.RemoteOperation | |||||||
| import com.owncloud.android.lib.common.operations.RemoteOperationResult | import com.owncloud.android.lib.common.operations.RemoteOperationResult | ||||||
| import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode.OK | import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode.OK | ||||||
| import com.owncloud.android.lib.common.utils.Log_OC | import com.owncloud.android.lib.common.utils.Log_OC | ||||||
| import com.owncloud.android.lib.testing.OpenForTesting |  | ||||||
| import org.json.JSONObject | import org.json.JSONObject | ||||||
| import java.net.URL | import java.net.URL | ||||||
| 
 | 
 | ||||||
| @ -48,7 +47,6 @@ import java.net.URL | |||||||
| /** | /** | ||||||
|  * Constructor |  * Constructor | ||||||
|  */ |  */ | ||||||
| @OpenForTesting |  | ||||||
| class GetRemoteCapabilitiesOperation : RemoteOperation<RemoteCapability>() { | class GetRemoteCapabilitiesOperation : RemoteOperation<RemoteCapability>() { | ||||||
| 
 | 
 | ||||||
|     override fun run(client: OwnCloudClient): RemoteOperationResult<RemoteCapability> { |     override fun run(client: OwnCloudClient): RemoteOperationResult<RemoteCapability> { | ||||||
|  | |||||||
| @ -27,9 +27,7 @@ package com.owncloud.android.lib.resources.status | |||||||
| 
 | 
 | ||||||
| import android.os.Parcel | import android.os.Parcel | ||||||
| import android.os.Parcelable | import android.os.Parcelable | ||||||
| import com.owncloud.android.lib.testing.OpenForTesting |  | ||||||
| 
 | 
 | ||||||
| @OpenForTesting |  | ||||||
| class OwnCloudVersion(version: String) : Comparable<OwnCloudVersion>, Parcelable { | class OwnCloudVersion(version: String) : Comparable<OwnCloudVersion>, Parcelable { | ||||||
| 
 | 
 | ||||||
|     // format is in version |     // format is in version | ||||||
|  | |||||||
| @ -1,31 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (C) 2018 The Android Open Source Project |  | ||||||
|  * |  | ||||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); |  | ||||||
|  * you may not use this file except in compliance with the License. |  | ||||||
|  * You may obtain a copy of the License at |  | ||||||
|  * |  | ||||||
|  *      http://www.apache.org/licenses/LICENSE-2.0 |  | ||||||
|  * |  | ||||||
|  * Unless required by applicable law or agreed to in writing, software |  | ||||||
|  * distributed under the License is distributed on an "AS IS" BASIS, |  | ||||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |  | ||||||
|  * See the License for the specific language governing permissions and |  | ||||||
|  * limitations under the License. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package com.owncloud.android.lib.testing |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * This annotation allows us to open some classes for mocking purposes while they are final in |  | ||||||
|  * release builds. |  | ||||||
|  */ |  | ||||||
| @Target(AnnotationTarget.ANNOTATION_CLASS) |  | ||||||
| annotation class OpenClass |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * Annotate a class with [OpenForTesting] if you want it to be extendable in debug builds. |  | ||||||
|  */ |  | ||||||
| @OpenClass |  | ||||||
| @Target(AnnotationTarget.CLASS) |  | ||||||
| annotation class OpenForTesting |  | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user