forked from nextcloud/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backup Calendar-Contacts configured with test cases.
- Loading branch information
1 parent
cf222d4
commit 0dfc9a1
Showing
3 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/src/test/java/com/nmc/android/CalendarBackupSetupTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.nmc.android | ||
|
||
import android.content.res.Resources | ||
import com.owncloud.android.R | ||
import org.junit.After | ||
import org.junit.Before | ||
import org.junit.Test | ||
import org.mockito.Mock | ||
import org.mockito.MockitoAnnotations | ||
|
||
class CalendarBackupSetupTest { | ||
|
||
@Mock | ||
lateinit var resources: Resources | ||
|
||
private lateinit var mocks: AutoCloseable | ||
|
||
@Before | ||
fun setUp() { | ||
mocks = MockitoAnnotations.openMocks(this) | ||
} | ||
|
||
@Test | ||
fun assertShowCalendarBackupBooleanFalse(){ | ||
assert(!resources.getBoolean(R.bool.show_calendar_backup)) | ||
} | ||
|
||
@After | ||
fun tearDown() { | ||
mocks.close() | ||
} | ||
|
||
} |