From 573afa15382b67cc84f67fc9a7b2329a72ecb352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Gonz=C3=A1lez=20Cabrero?= Date: Mon, 21 Mar 2016 09:03:51 +0100 Subject: [PATCH] Update comment, error handling and indentation in the automatic test --- .../test/UpdatePublicShareTest.java | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/test_client/tests/src/com/owncloud/android/lib/test_project/test/UpdatePublicShareTest.java b/test_client/tests/src/com/owncloud/android/lib/test_project/test/UpdatePublicShareTest.java index fe01e348..21f474ae 100644 --- a/test_client/tests/src/com/owncloud/android/lib/test_project/test/UpdatePublicShareTest.java +++ b/test_client/tests/src/com/owncloud/android/lib/test_project/test/UpdatePublicShareTest.java @@ -136,32 +136,32 @@ public class UpdatePublicShareTest extends RemoteTest { if (result.isSuccess()){ mShare = (OCShare) result.getData().get(0); } else{ - mShare = null; + Utils.logAndThrow(LOG_TAG, result); } - // Create the folder - mFullPath2FolderToShare = mBaseFolderPath + FOLDER_TO_SHARE; - result = getActivity().createFolder( - mFullPath2FolderToShare, - true); - if (!result.isSuccess()) { - Utils.logAndThrow(LOG_TAG, result); - } + // Create the folder + mFullPath2FolderToShare = mBaseFolderPath + FOLDER_TO_SHARE; + result = getActivity().createFolder( + mFullPath2FolderToShare, + true); + if (!result.isSuccess()) { + Utils.logAndThrow(LOG_TAG, result); + } - // Share the folder privately with a group - result = getActivity().createShare( - mFullPath2FolderToShare, - ShareType.PUBLIC_LINK, - "", - false, - "", - OCShare.READ_PERMISSION_FLAG); + // Share the folder publicly via link + result = getActivity().createShare( + mFullPath2FolderToShare, + ShareType.PUBLIC_LINK, + "", + false, + "", + OCShare.READ_PERMISSION_FLAG); - if (result.isSuccess()){ - mFolderShare = (OCShare) result.getData().get(0); - } else{ - mFolderShare = null; - } + if (result.isSuccess()){ + mFolderShare = (OCShare) result.getData().get(0); + } else{ + Utils.logAndThrow(LOG_TAG, result); + } Log.v(LOG_TAG, "Remote fixtures created.");