테스트 케이스 추가

This commit is contained in:
cho
2026-01-15 09:45:41 +09:00
parent 6b55b51ad6
commit 3ebd36d776
9 changed files with 148 additions and 3888 deletions
@@ -425,15 +425,25 @@ public class Transformer {
errors.add(targetMessage.toString());
return;
}
String type = targetMessage.getLayout().getLayoutType().getName();
if ( resultItem.getValue() != null ) {
if ( !( resultItem.getValue() instanceof byte[] && ((byte[])resultItem.getValue()).length == 0 ) ) {
return;
}
//변환에서 src->target으로 값이 맵핑된적이 있나? Grid to Group 같은 경우에는 첫그리드 index 항목에서 맵핑후,
//같은 path의 Group 항목에 중첩될것이니 flag는 true. 그렇다면 PASS 왜냐하면 고객요건이 Grid to Group에서 Grid 첫번째 항목만 맵핑되었으면 함.
//해당 로직없으면 계속 덮어씌기가 되며 맨 마지막 index 항목이 맵핑됨.
if ( resultItem.isMappingFlag() ) {
return;
}
resultItem.mapped();
// if (resultItem.getValue() != null) {
// if (!(resultItem.getValue() instanceof byte[] && ((byte[]) resultItem.getValue()).length == 0)) {
// return;
// }
//
// }
/**
*
@@ -58,6 +58,16 @@ abstract public class Item implements Serializable, Cloneable {
protected String multiLang = ""; // multi language 관련
boolean mappingFlag = false;
public boolean isMappingFlag() {
return mappingFlag;
}
public void mapped() {
mappingFlag = true;
}
/**
* reference item
*/
@@ -194,7 +194,8 @@ public abstract class Leaf extends Item {
public Object clone() {
Item clone = (Item) super.clone();
clone.initDefaultValue();
clone.setMappedValue(false);
clone.setMappedValue(false); //반복횟수 참조변수가 맵핑 되었는지
clone.mappingFlag = false; //SRC->TGT 전문으로 값이 맵핑된적이 있는지에 대한 플래그 위에 flag(mappedValue)랑 헷갈리면 안됨.
return clone;
}