From e941d571cf9ee48e2d988a10e591dee195521b6b Mon Sep 17 00:00:00 2001 From: masensio Date: Tue, 12 Nov 2013 14:13:50 +0100 Subject: [PATCH] OC-1869: Create Unit Tests --- oc_framework-test-project/AndroidManifest.xml | 4 +- .../test/CreateFolderTest.java | 14 +++++-- .../oc_framework_test_project/TestActivity.java | 43 ++++++++++++++++++---- 3 files changed, 48 insertions(+), 13 deletions(-) diff --git a/oc_framework-test-project/AndroidManifest.xml b/oc_framework-test-project/AndroidManifest.xml index b7d12fd9..d4d5316a 100644 --- a/oc_framework-test-project/AndroidManifest.xml +++ b/oc_framework-test-project/AndroidManifest.xml @@ -5,11 +5,13 @@ android:versionName="1.0" > + + + android:targetSdkVersion="19" /> { private TestActivity mActivity; + private String mCurrentDate; public CreateFolderTest() { super(TestActivity.class); + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss"); + mCurrentDate = sdf.format(new Date()); } @Override @@ -23,8 +29,8 @@ public class CreateFolderTest extends ActivityInstrumentationTestCase2"+ am.getUserData(mAccount, "oc_version") ); + Log.d(TAG, "oc_base_url --->"+ am.getUserData(mAccount, "oc_base_url") ); + } + + try { mClient = OwnCloudClientUtils.createOwnCloudClient(mAccount, this.getApplicationContext(), authorities); } catch (OperationCanceledException e) { @@ -65,6 +86,12 @@ public class TestActivity extends Activity { return true; } + /** + * Access to the library method to Create a Folder + * @param remotePath + * @param createFullPath + * @return + */ public RemoteOperationResult createFolder(String remotePath, boolean createFullPath) { CreateRemoteFolderOperation createOperation = new CreateRemoteFolderOperation(remotePath, createFullPath); -- 2.11.0