mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 02:38:58 +03:00
reformat code
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
8ef4e04312
commit
a930d9b6e1
1 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,4 @@
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
* Nextcloud Android client application
|
* Nextcloud Android client application
|
||||||
*
|
*
|
||||||
* @author Tobias Kaminsky
|
* @author Tobias Kaminsky
|
||||||
|
@ -49,16 +48,15 @@ class ContactsBackupIT : AbstractOnServerIT() {
|
||||||
@get:Rule
|
@get:Rule
|
||||||
val readContactsRule = GrantPermissionRule.grant(Manifest.permission.READ_CONTACTS)
|
val readContactsRule = GrantPermissionRule.grant(Manifest.permission.READ_CONTACTS)
|
||||||
|
|
||||||
|
private val vcard: String = "vcard.vcf"
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun importExport() {
|
fun importExport() {
|
||||||
val intArray = IntArray(1)
|
val intArray = IntArray(1)
|
||||||
intArray[0] = 0
|
intArray[0] = 0
|
||||||
|
|
||||||
// import file to local contacts
|
// import file to local contacts
|
||||||
backgroundJobManager.startImmediateContactsImport(null,
|
backgroundJobManager.startImmediateContactsImport(null, null, getFile(vcard).absolutePath, intArray)
|
||||||
null,
|
|
||||||
getFile("vcard.vcf").absolutePath,
|
|
||||||
intArray)
|
|
||||||
|
|
||||||
shortSleep()
|
shortSleep()
|
||||||
|
|
||||||
|
@ -76,8 +74,10 @@ class ContactsBackupIT : AbstractOnServerIT() {
|
||||||
refreshFolder(backupFolder)
|
refreshFolder(backupFolder)
|
||||||
longSleep()
|
longSleep()
|
||||||
|
|
||||||
val backupOCFile = storageManager.getFolderContent(storageManager.getFileByDecryptedRemotePath(backupFolder),
|
val backupOCFile = storageManager.getFolderContent(
|
||||||
false)[0]
|
storageManager.getFileByDecryptedRemotePath(backupFolder),
|
||||||
|
false
|
||||||
|
)[0]
|
||||||
|
|
||||||
assertTrue(DownloadFileOperation(account, backupOCFile, AbstractIT.targetContext).execute(client).isSuccess)
|
assertTrue(DownloadFileOperation(account, backupOCFile, AbstractIT.targetContext).execute(client).isSuccess)
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class ContactsBackupIT : AbstractOnServerIT() {
|
||||||
|
|
||||||
// verify same
|
// verify same
|
||||||
val originalCards: ArrayList<VCard> = ArrayList()
|
val originalCards: ArrayList<VCard> = ArrayList()
|
||||||
originalCards.addAll(Ezvcard.parse(getFile("vcard.vcf")).all())
|
originalCards.addAll(Ezvcard.parse(getFile(vcard)).all())
|
||||||
|
|
||||||
val backupCards: ArrayList<VCard> = ArrayList()
|
val backupCards: ArrayList<VCard> = ArrayList()
|
||||||
backupCards.addAll(Ezvcard.parse(backupFile).all())
|
backupCards.addAll(Ezvcard.parse(backupFile).all())
|
||||||
|
|
Loading…
Reference in a new issue