package com.tt.honeyDue.viewmodel

import com.tt.honeyDue.viewmodel.DocumentViewModel
import com.tt.honeyDue.network.ApiResult
import kotlin.test.Test
import kotlin.test.assertIs

class DocumentViewModelTest {

    // MARK: - Initialization Tests

    @Test
    fun testInitialDocumentsState() {
        // Given
        val viewModel = DocumentViewModel()

        // Then
        assertIs<ApiResult.Idle>(viewModel.documentsState.value)
    }

    @Test
    fun testInitialDocumentDetailState() {
        // Given
        val viewModel = DocumentViewModel()

        // Then
        assertIs<ApiResult.Idle>(viewModel.documentDetailState.value)
    }

    @Test
    fun testInitialCreateState() {
        // Given
        val viewModel = DocumentViewModel()

        // Then
        assertIs<ApiResult.Idle>(viewModel.createState.value)
    }

    @Test
    fun testInitialUpdateState() {
        // Given
        val viewModel = DocumentViewModel()

        // Then
        assertIs<ApiResult.Idle>(viewModel.updateState.value)
    }

    @Test
    fun testInitialDeleteState() {
        // Given
        val viewModel = DocumentViewModel()

        // Then
        assertIs<ApiResult.Idle>(viewModel.deleteState.value)
    }

    @Test
    fun testInitialDownloadState() {
        // Given
        val viewModel = DocumentViewModel()

        // Then
        assertIs<ApiResult.Idle>(viewModel.downloadState.value)
    }
}
