/*
 * Copyright 2025 - 2026 PICO. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.pico.spatialui.sample.viewmodel

import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test

class RelationshipViewModelTest {

    @Test
    fun followingList_containsAllUsers() {
        val vm = RelationshipViewModel()
        val following = vm.myFollowingList.value
        assertEquals(7, following.size)
        assertTrue(following.all { it.isFollowing })
    }

    @Test
    fun followerList_containsOnlyFollowers() {
        val vm = RelationshipViewModel()
        val followers = vm.myFollowerList.value
        assertEquals(4, followers.size)
        assertTrue(followers.all { it.isFollower })
    }

    @Test
    fun recommendedUserList_containsOnlyHotUsers() {
        val vm = RelationshipViewModel()
        val hotUsers = vm.recommendedUserList.value
        assertEquals(4, hotUsers.size)
        assertTrue(hotUsers.all { it.hot })
    }

    @Test
    fun mutualList_containsOnlyMutuals() {
        val vm = RelationshipViewModel()
        val mutuals = vm.mutualList.value
        assertEquals(4, mutuals.size)
        assertTrue(mutuals.all { it.isFollowing && it.isFollower })
    }
}
