package com.ruoyi.info.collection.service;

import com.ruoyi.info.collection.domain.dto.CcdiAssetInfoDTO;
import com.ruoyi.info.collection.domain.dto.CcdiBaseStaffAddDTO;
import com.ruoyi.info.collection.domain.dto.CcdiBaseStaffEditDTO;
import com.ruoyi.info.collection.domain.vo.CcdiAssetInfoVO;
import com.ruoyi.info.collection.domain.vo.CcdiBaseStaffVO;
import org.junit.jupiter.api.Test;

import java.util.List;

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

class CcdiBaseStaffServiceAssetAggregationTest {

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

        addDTO.setAssetInfoList(assetInfoList);

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

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

        editDTO.setAssetInfoList(assetInfoList);

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

    @Test
    void staffVo_shouldExposeAssetInfoList() {
        CcdiBaseStaffVO staffVO = new CcdiBaseStaffVO();
        List<CcdiAssetInfoVO> assetInfoList = List.of(new CcdiAssetInfoVO());

        staffVO.setAssetInfoList(assetInfoList);

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