新增亲属资产领域对象与映射
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.info.collection.service;
|
||||
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAssetInfoDTO;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiAssetInfoExcel;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class CcdiAssetInfoDesignContractTest {
|
||||
|
||||
@Test
|
||||
void aggregateSaveDto_shouldNotExposePersonId() {
|
||||
Set<String> fieldNames = Arrays.stream(CcdiAssetInfoDTO.class.getDeclaredFields())
|
||||
.map(field -> field.getName())
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
assertFalse(fieldNames.contains("personId"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void importExcel_shouldStillExposePersonIdForRelationCertNoMatching() {
|
||||
Set<String> fieldNames = Arrays.stream(CcdiAssetInfoExcel.class.getDeclaredFields())
|
||||
.map(field -> field.getName())
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
assertTrue(fieldNames.contains("personId"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user