Skip to content

Commit 1f03609

Browse files
wip
Signed-off-by: tobiasKaminsky <[email protected]>
1 parent 2c44e87 commit 1f03609

File tree

13 files changed

+81
-42
lines changed

13 files changed

+81
-42
lines changed

library/src/androidTest/java/com/nextcloud/android/lib/resources/search/UnifiedSearchRemoteOperationIT.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class UnifiedSearchRemoteOperationIT : AbstractIT() {
5959
@Test
6060
fun filesSearch() {
6161
val remotePath = "/testFolder"
62-
assertTrue(CreateFolderRemoteOperation(remotePath, true).execute(client).isSuccess)
62+
assertTrue(CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient).isSuccess)
6363
val remoteFile = ReadFileRemoteOperation(remotePath)
6464
.execute(client).data[0] as RemoteFile
6565
val fileId = remoteFile.localId
@@ -80,7 +80,12 @@ class UnifiedSearchRemoteOperationIT : AbstractIT() {
8080

8181
@Test
8282
fun filesSearchWhitespace() {
83-
assertTrue(CreateFolderRemoteOperation("/test Folder/", true).execute(client).isSuccess)
83+
assertTrue(
84+
CreateFolderRemoteOperation(
85+
"/test Folder/",
86+
true
87+
).execute(nextcloudClient).isSuccess
88+
)
8489

8590
val result = UnifiedSearchRemoteOperation("files", "test").execute(nextcloudClient)
8691
assertTrue(result.isSuccess)

library/src/androidTest/java/com/nextcloud/android/lib/richWorkspace/RichWorkspaceDirectEditingRemoteOperationIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void getEditLinkForRoot() {
5353
public void getEditLinkForFolder() {
5454
String path = "/workspace/sub1/";
5555

56-
assertTrue(new CreateFolderRemoteOperation(path, true).execute(client).isSuccess());
56+
assertTrue(new CreateFolderRemoteOperation(path, true).execute(nextcloudClient).isSuccess());
5757

5858
RemoteOperationResult result = new RichWorkspaceDirectEditingRemoteOperation(path).execute(client);
5959
assertTrue(result.isSuccess());
@@ -70,7 +70,7 @@ public void reuseExistingFile() throws IOException {
7070
String filePath = folder + "Readme.md";
7171
File txtFile = getFile(ASSETS__TEXT_FILE_NAME);
7272

73-
assertTrue(new CreateFolderRemoteOperation(folder, true).execute(client).isSuccess());
73+
assertTrue(new CreateFolderRemoteOperation(folder, true).execute(nextcloudClient).isSuccess());
7474

7575
RemoteOperationResult uploadResult = new UploadFileRemoteOperation(txtFile.getAbsolutePath(),
7676
filePath,

library/src/androidTest/java/com/nextcloud/lib/resources/users/GetActivitiesRemoteOperationIT.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ class GetActivitiesRemoteOperationIT : AbstractIT() {
3333
@Test
3434
fun getActivities() {
3535
// set-up, create a folder so there is an activity
36-
assertTrue(CreateFolderRemoteOperation("/test/123/1", true).execute(client).isSuccess)
36+
assertTrue(
37+
CreateFolderRemoteOperation(
38+
"/test/123/1",
39+
true
40+
).execute(nextcloudClient).isSuccess
41+
)
3742

3843
val result = nextcloudClient.execute(GetActivitiesRemoteOperation())
3944
assertTrue(result.isSuccess)

library/src/androidTest/java/com/owncloud/android/CopyFileIT.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
*/
2727
package com.owncloud.android;
2828

29+
import static org.junit.Assert.assertEquals;
30+
import static org.junit.Assert.assertSame;
31+
import static org.junit.Assert.assertTrue;
32+
2933
import android.util.Log;
3034

3135
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
@@ -42,10 +46,6 @@
4246

4347
import java.io.File;
4448

45-
import static org.junit.Assert.assertEquals;
46-
import static org.junit.Assert.assertSame;
47-
import static org.junit.Assert.assertTrue;
48-
4949
/**
5050
* Class to test CopyRemoteFileOperation
5151
*/
@@ -180,7 +180,7 @@ public void createFixtures() throws Exception {
180180

181181
RemoteOperationResult result;
182182
for (String folderPath : FOLDERS_IN_FIXTURE) {
183-
result = new CreateFolderRemoteOperation(folderPath, true).execute(client);
183+
result = new CreateFolderRemoteOperation(folderPath, true).execute(nextcloudClient);
184184

185185
assertTrue("Error creating folder" + folderPath + ": " + result, result.isSuccess());
186186
}

library/src/androidTest/java/com/owncloud/android/CreateFolderIT.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*/
2727
package com.owncloud.android;
2828

29+
import static org.junit.Assert.assertTrue;
30+
2931
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
3032
import com.owncloud.android.lib.resources.files.CreateFolderRemoteOperation;
3133
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
@@ -39,8 +41,6 @@
3941
import java.util.Iterator;
4042
import java.util.List;
4143

42-
import static org.junit.Assert.assertTrue;
43-
4444
/**
4545
* Class to test Create Folder Operation
4646
*/
@@ -70,13 +70,13 @@ public void setUp() {
7070
public void testCreateFolder() {
7171
String remotePath = mFullPath2FolderBase;
7272
mCreatedFolderPaths.add(remotePath);
73-
RemoteOperationResult result = new CreateFolderRemoteOperation(remotePath, true).execute(client);
73+
RemoteOperationResult result = new CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient);
7474
assertTrue(result.isSuccess());
7575

7676
// Create Subfolder
7777
remotePath = mFullPath2FolderBase + FOLDER_PATH_BASE;
7878
mCreatedFolderPaths.add(remotePath);
79-
result = new CreateFolderRemoteOperation(remotePath, true).execute(client);
79+
result = new CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient);
8080
assertTrue(result.isSuccess());
8181
}
8282

@@ -87,31 +87,31 @@ public void testCreateFolder() {
8787
@Test
8888
public void testCreateFolderSpecialCharactersOnNewVersion() {
8989
String remotePath = mFullPath2FolderBase + "_<";
90-
RemoteOperationResult result = new CreateFolderRemoteOperation(remotePath, true).execute(client);
90+
RemoteOperationResult result = new CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient);
9191
assertTrue("Remote path: " + remotePath, result.isSuccess());
9292

9393
remotePath = mFullPath2FolderBase + "_>";
94-
result = new CreateFolderRemoteOperation(remotePath, true).execute(client);
94+
result = new CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient);
9595
assertTrue("Remote path: " + remotePath, result.isSuccess());
9696

9797
remotePath = mFullPath2FolderBase + "_:";
98-
result = new CreateFolderRemoteOperation(remotePath, true).execute(client);
98+
result = new CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient);
9999
assertTrue("Remote path: " + remotePath, result.isSuccess());
100100

101101
remotePath = mFullPath2FolderBase + "_\"";
102-
result = new CreateFolderRemoteOperation(remotePath, true).execute(client);
102+
result = new CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient);
103103
assertTrue("Remote path: " + remotePath, result.isSuccess());
104104

105105
remotePath = mFullPath2FolderBase + "_|";
106-
result = new CreateFolderRemoteOperation(remotePath, true).execute(client);
106+
result = new CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient);
107107
assertTrue("Remote path: " + remotePath, result.isSuccess());
108108

109109
remotePath = mFullPath2FolderBase + "_?";
110-
result = new CreateFolderRemoteOperation(remotePath, true).execute(client);
110+
result = new CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient);
111111
assertTrue("Remote path: " + remotePath, result.isSuccess());
112112

113113
remotePath = mFullPath2FolderBase + "_*";
114-
result = new CreateFolderRemoteOperation(remotePath, true).execute(client);
114+
result = new CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient);
115115
assertTrue("Remote path: " + remotePath, result.isSuccess());
116116
}
117117

library/src/androidTest/java/com/owncloud/android/DeleteFileIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void setUp() throws Exception {
5858
mFullPath2Folder = baseFolderPath + FOLDER_PATH;
5959
mFullPath2File = baseFolderPath + FILE_PATH;
6060

61-
RemoteOperationResult result = new CreateFolderRemoteOperation(mFullPath2Folder, true).execute(client);
61+
RemoteOperationResult result = new CreateFolderRemoteOperation(mFullPath2Folder, true).execute(nextcloudClient);
6262
assertTrue("Error creating folder" + mFullPath2Folder + ": " + result, result.isSuccess());
6363

6464
File textFile = getFile(ASSETS__TEXT_FILE_NAME);

library/src/androidTest/java/com/owncloud/android/lib/common/operations/GetSharesIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@
4949
public class GetSharesIT extends AbstractIT {
5050
@Test
5151
public void testGetShares() {
52-
assertTrue(new CreateFolderRemoteOperation("/1/", true).execute(client).isSuccess());
52+
assertTrue(new CreateFolderRemoteOperation("/1/", true).execute(nextcloudClient).isSuccess());
5353
assertTrue(new CreateShareRemoteOperation("/1/",
5454
ShareType.PUBLIC_LINK,
5555
"",
5656
false,
5757
"",
5858
1).execute(client).isSuccess());
5959

60-
assertTrue(new CreateFolderRemoteOperation("/2/", true).execute(client).isSuccess());
60+
assertTrue(new CreateFolderRemoteOperation("/2/", true).execute(nextcloudClient).isSuccess());
6161
assertTrue(new CreateShareRemoteOperation("/2/",
6262
ShareType.PUBLIC_LINK,
6363
"",

library/src/androidTest/java/com/owncloud/android/lib/resources/e2ee/UpdateMetadataRemoteOperationIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void uploadAndModify() {
5959

6060
// create folder
6161
String folder = "/" + RandomString.make(20) + "/";
62-
assertTrue(new CreateFolderRemoteOperation(folder, true).execute(client).isSuccess());
62+
assertTrue(new CreateFolderRemoteOperation(folder, true).execute(nextcloudClient).isSuccess());
6363
RemoteFile remoteFolder = (RemoteFile) new ReadFileRemoteOperation(folder).execute(client).getSingleData();
6464

6565
assertNotNull(remoteFolder);

library/src/androidTest/java/com/owncloud/android/lib/resources/files/ReadFileRemoteOperationIT.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ReadFileRemoteOperationIT : AbstractIT() {
3131
fun readRemoteFolder() {
3232
val remotePath = "/test/"
3333

34-
assertTrue(CreateFolderRemoteOperation(remotePath, true).execute(client).isSuccess)
34+
assertTrue(CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient).isSuccess)
3535

3636
val result = ReadFileRemoteOperation(remotePath).execute(client)
3737

library/src/androidTest/java/com/owncloud/android/lib/resources/files/ReadFolderRemoteOperationIT.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ReadFolderRemoteOperationIT : AbstractIT() {
3232
fun readRemoteFolderWithContent() {
3333
val remotePath = "/test/"
3434

35-
assertTrue(CreateFolderRemoteOperation(remotePath, true).execute(client).isSuccess)
35+
assertTrue(CreateFolderRemoteOperation(remotePath, true).execute(nextcloudClient).isSuccess)
3636

3737
// create file
3838
val filePath = createFile("text")

0 commit comments

Comments
 (0)