mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 13:15:35 +03:00
Add AssistantRepositoryTests
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
8aa37e8f79
commit
5a67b58b5e
1 changed files with 8 additions and 2 deletions
|
@ -44,7 +44,13 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
|
|||
|
||||
@Test
|
||||
fun testGetTaskList() {
|
||||
assertTrue(sut?.getTaskList("assistant")?.resultData?.tasks?.isNotEmpty() == true)
|
||||
val result = sut?.getTaskList("assistant")?.resultData?.tasks
|
||||
|
||||
if (result == null) {
|
||||
fail("Expected to get task list but found null")
|
||||
}
|
||||
|
||||
assertTrue(result?.isEmpty() == true || (result?.size ?: 0) > 0)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -59,7 +65,7 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
|
|||
fun testDeleteTask() {
|
||||
testCreateTask()
|
||||
|
||||
longSleep()
|
||||
shortSleep()
|
||||
|
||||
val taskList = sut?.getTaskList("assistant")?.resultData?.tasks
|
||||
val taskListCountBeforeDelete = taskList?.size
|
||||
|
|
Loading…
Reference in a new issue