Add AssistantRepositoryTests

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-03-01 11:05:35 +01:00 committed by Alper Öztürk
parent 8aa37e8f79
commit 5a67b58b5e

View file

@ -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