package com.tt.honeyDue.viewmodel

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

class ResidenceViewModelTest {

    // MARK: - Initialization Tests

    @Test
    fun testInitialResidencesState() {
        // Given
        val viewModel = ResidenceViewModel()

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

    @Test
    fun testInitialCreateResidenceState() {
        // Given
        val viewModel = ResidenceViewModel()

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

    @Test
    fun testInitialUpdateResidenceState() {
        // Given
        val viewModel = ResidenceViewModel()

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

    @Test
    fun testInitialMyResidencesState() {
        // Given
        val viewModel = ResidenceViewModel()

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

    @Test
    fun testInitialDeleteResidenceState() {
        // Given
        val viewModel = ResidenceViewModel()

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