package com.ruoyi.info.collection.service;

import com.ruoyi.info.collection.domain.dto.CcdiAssetInfoDTO;
import com.ruoyi.info.collection.domain.dto.CcdiStaffFmyRelationAddDTO;
import com.ruoyi.info.collection.domain.dto.CcdiStaffFmyRelationEditDTO;
import com.ruoyi.info.collection.domain.vo.CcdiAssetInfoVO;
import com.ruoyi.info.collection.domain.vo.CcdiStaffFmyRelationVO;
import org.junit.jupiter.api.Test;

import java.util.List;

import static org.junit.jupiter.api.Assertions.assertSame;

class CcdiStaffFmyRelationAssetAggregationTest {

    @Test
    void addDto_shouldExposeAssetInfoList() {
        CcdiStaffFmyRelationAddDTO addDTO = new CcdiStaffFmyRelationAddDTO();
        List<CcdiAssetInfoDTO> assetInfoList = List.of(new CcdiAssetInfoDTO());

        addDTO.setAssetInfoList(assetInfoList);

        assertSame(assetInfoList, addDTO.getAssetInfoList());
    }

    @Test
    void editDto_shouldExposeAssetInfoList() {
        CcdiStaffFmyRelationEditDTO editDTO = new CcdiStaffFmyRelationEditDTO();
        List<CcdiAssetInfoDTO> assetInfoList = List.of(new CcdiAssetInfoDTO());

        editDTO.setAssetInfoList(assetInfoList);

        assertSame(assetInfoList, editDTO.getAssetInfoList());
    }

    @Test
    void relationVo_shouldExposeAssetInfoList() {
        CcdiStaffFmyRelationVO relationVO = new CcdiStaffFmyRelationVO();
        List<CcdiAssetInfoVO> assetInfoList = List.of(new CcdiAssetInfoVO());

        relationVO.setAssetInfoList(assetInfoList);

        assertSame(assetInfoList, relationVO.getAssetInfoList());
    }
}
