|
@@ -41,7 +41,6 @@ import com.owncloud.android.operations.RemoveFileOperation;
|
|
|
import com.owncloud.android.operations.UploadFileOperation;
|
|
|
import com.owncloud.android.utils.FileStorageUtils;
|
|
|
|
|
|
-import org.junit.After;
|
|
|
import org.junit.Before;
|
|
|
import org.junit.Test;
|
|
|
|
|
@@ -106,29 +105,6 @@ public class UploadIT extends AbstractOnServerIT {
|
|
|
createDummyFiles();
|
|
|
}
|
|
|
|
|
|
- @After
|
|
|
- public void after() {
|
|
|
- RemoteOperationResult result = new RefreshFolderOperation(getStorageManager().getFileByPath("/"),
|
|
|
- System.currentTimeMillis() / 1000L,
|
|
|
- false,
|
|
|
- true,
|
|
|
- getStorageManager(),
|
|
|
- user,
|
|
|
- targetContext)
|
|
|
- .execute(client);
|
|
|
-
|
|
|
- // cleanup only if folder exists
|
|
|
- if (result.isSuccess() && getStorageManager().getFileByDecryptedRemotePath(FOLDER) != null) {
|
|
|
- new RemoveFileOperation(getStorageManager().getFileByDecryptedRemotePath(FOLDER),
|
|
|
- false,
|
|
|
- user,
|
|
|
- false,
|
|
|
- targetContext,
|
|
|
- getStorageManager())
|
|
|
- .execute(client);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
@Test
|
|
|
public void testEmptyUpload() {
|
|
|
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/empty.txt",
|
|
@@ -529,8 +505,8 @@ public class UploadIT extends AbstractOnServerIT {
|
|
|
|
|
|
assertNotNull(ocFile);
|
|
|
assertEquals(remotePath, ocFile.getRemotePath());
|
|
|
- assertEquals(new ImageDimension(451f, 529f), ocFile.getImageDimension());
|
|
|
- assertEquals(new GeoLocation(49.99679166666667, 8.67198611111111), ocFile.getGeoLocation());
|
|
|
+ assertEquals(new ImageDimension(300f, 200f), ocFile.getImageDimension());
|
|
|
+ assertEquals(new GeoLocation(64, -46), ocFile.getGeoLocation());
|
|
|
}
|
|
|
|
|
|
private void verifyStoragePath(OCFile file) {
|