mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 23:11:58 +03:00
update tests
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
92c99b2233
commit
3cffeee863
1 changed files with 4 additions and 3 deletions
|
@ -10,7 +10,6 @@ package com.nextcloud.client.assistant
|
||||||
import com.nextcloud.client.assistant.repository.AssistantRepository
|
import com.nextcloud.client.assistant.repository.AssistantRepository
|
||||||
import com.owncloud.android.AbstractOnServerIT
|
import com.owncloud.android.AbstractOnServerIT
|
||||||
import com.owncloud.android.lib.resources.assistant.model.TaskTypeData
|
import com.owncloud.android.lib.resources.assistant.model.TaskTypeData
|
||||||
import com.owncloud.android.lib.resources.assistant.model.toTaskTypeDataList
|
|
||||||
import com.owncloud.android.lib.resources.status.NextcloudVersion
|
import com.owncloud.android.lib.resources.status.NextcloudVersion
|
||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
|
@ -37,7 +36,7 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
|
||||||
val result = sut?.getTaskTypes()
|
val result = sut?.getTaskTypes()
|
||||||
assertTrue(result?.isSuccess == true)
|
assertTrue(result?.isSuccess == true)
|
||||||
|
|
||||||
val taskTypes = result?.resultData?.toTaskTypeDataList()
|
val taskTypes = result?.resultData
|
||||||
assertTrue(taskTypes?.isNotEmpty() == true)
|
assertTrue(taskTypes?.isNotEmpty() == true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +67,9 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
|
||||||
val taskType = TaskTypeData(
|
val taskType = TaskTypeData(
|
||||||
"core:text2text",
|
"core:text2text",
|
||||||
"Free text to text prompt",
|
"Free text to text prompt",
|
||||||
"Runs an arbitrary prompt through a language model that returns a reply"
|
"Runs an arbitrary prompt through a language model that returns a reply",
|
||||||
|
null,
|
||||||
|
null
|
||||||
)
|
)
|
||||||
val result = sut?.createTask(input, taskType)
|
val result = sut?.createTask(input, taskType)
|
||||||
assertTrue(result?.isSuccess == true)
|
assertTrue(result?.isSuccess == true)
|
||||||
|
|
Loading…
Reference in a new issue