mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Fixed MoveFileTest.java
This commit is contained in:
parent
d4af8a6a33
commit
dc26392647
@ -24,9 +24,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<string name="server_base_url"></string> <!-- the server url, without webdav path -->
|
<string name="server_base_url"></string>
|
||||||
<string name="webdav_path">/remote.php/webdav</string> <!-- default value for webdav path (owncloud version > = 4)-->
|
|
||||||
<string name="username"></string>
|
<string name="username"></string>
|
||||||
<string name="password"></string>
|
<string name="password"></string>
|
||||||
<bool name="chunked">true</bool>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -95,27 +95,27 @@ public class MoveFileTest extends AndroidTestCase {
|
|||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
|
mServerUri = getContext().getString(R.string.server_base_url);
|
||||||
|
mUser = getContext().getString(R.string.username);
|
||||||
|
mPass = getContext().getString(R.string.password);
|
||||||
|
|
||||||
|
mClient = new OwnCloudClient(
|
||||||
|
Uri.parse(mServerUri),
|
||||||
|
NetworkUtils.getMultiThreadedConnManager()
|
||||||
|
);
|
||||||
|
mClient.setDefaultTimeouts(
|
||||||
|
OwnCloudClientFactory.DEFAULT_DATA_TIMEOUT,
|
||||||
|
OwnCloudClientFactory.DEFAULT_CONNECTION_TIMEOUT);
|
||||||
|
mClient.setFollowRedirects(true);
|
||||||
|
mClient.setCredentials(
|
||||||
|
OwnCloudCredentialsFactory.newBasicCredentials(
|
||||||
|
mUser,
|
||||||
|
mPass
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (!mGlobalSetupDone) {
|
if (!mGlobalSetupDone) {
|
||||||
|
|
||||||
mServerUri = getContext().getString(R.string.server_base_url);
|
|
||||||
mUser = getContext().getString(R.string.username);
|
|
||||||
mPass = getContext().getString(R.string.password);
|
|
||||||
|
|
||||||
mClient = new OwnCloudClient(
|
|
||||||
Uri.parse(mServerUri),
|
|
||||||
NetworkUtils.getMultiThreadedConnManager()
|
|
||||||
);
|
|
||||||
mClient.setDefaultTimeouts(
|
|
||||||
OwnCloudClientFactory.DEFAULT_DATA_TIMEOUT,
|
|
||||||
OwnCloudClientFactory.DEFAULT_CONNECTION_TIMEOUT);
|
|
||||||
mClient.setFollowRedirects(true);
|
|
||||||
mClient.setCredentials(
|
|
||||||
OwnCloudCredentialsFactory.newBasicCredentials(
|
|
||||||
mUser,
|
|
||||||
mPass
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
Log.v(LOG_TAG, "Starting global set up");
|
Log.v(LOG_TAG, "Starting global set up");
|
||||||
RemoteOperationResult result =
|
RemoteOperationResult result =
|
||||||
TestActivity.createFolder(SRC_FOLDER_PATH, true, mClient);
|
TestActivity.createFolder(SRC_FOLDER_PATH, true, mClient);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user