update tests

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-12-04 11:42:07 +01:00 committed by Alper Öztürk
parent 92c99b2233
commit 3cffeee863

View file

@ -10,7 +10,6 @@ package com.nextcloud.client.assistant
import com.nextcloud.client.assistant.repository.AssistantRepository
import com.owncloud.android.AbstractOnServerIT
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 org.junit.Assert.assertTrue
import org.junit.Before
@ -37,7 +36,7 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
val result = sut?.getTaskTypes()
assertTrue(result?.isSuccess == true)
val taskTypes = result?.resultData?.toTaskTypeDataList()
val taskTypes = result?.resultData
assertTrue(taskTypes?.isNotEmpty() == true)
}
@ -68,7 +67,9 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
val taskType = TaskTypeData(
"core:text2text",
"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)
assertTrue(result?.isSuccess == true)