mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +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
|
@Test
|
||||||
fun testGetTaskList() {
|
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
|
@Test
|
||||||
|
@ -59,7 +65,7 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
|
||||||
fun testDeleteTask() {
|
fun testDeleteTask() {
|
||||||
testCreateTask()
|
testCreateTask()
|
||||||
|
|
||||||
longSleep()
|
shortSleep()
|
||||||
|
|
||||||
val taskList = sut?.getTaskList("assistant")?.resultData?.tasks
|
val taskList = sut?.getTaskList("assistant")?.resultData?.tasks
|
||||||
val taskListCountBeforeDelete = taskList?.size
|
val taskListCountBeforeDelete = taskList?.size
|
||||||
|
|
Loading…
Reference in a new issue