Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
2026-09-15 15:28:40 +08:00
193 changed files with 3807 additions and 943 deletions
@@ -28,11 +28,13 @@ class RelabelDocumentServiceTest {
when(applications.lockNo("101","RL-1")).thenReturn(application);when(applications.findNo("101","RL-1")).thenReturn(application);
}
@Test void totalUploadPersistsReturnedMetadataAndExposesSummary(){
when(files.upload("101","OVERSEAS_RELABEL_TOTAL_DOCUMENT","11",7L,pdf)).thenReturn(new RelabelDocumentFileGateway.UploadedFile(99L,"labels.pdf","application/pdf",15));
when(files.upload("101","OVERSEAS_RELABEL_CARTON_TOTAL_DOCUMENT","11",7L,pdf)).thenReturn(new RelabelDocumentFileGateway.UploadedFile(99L,"labels.pdf","application/pdf",15));
var result=service.uploadTotalFile("101","RL-1",7L,pdf);
assertThat(result.application().totalFileId()).isEqualTo("99");
assertThat(result.application().totalFileName()).isEqualTo("labels.pdf");
assertThat(result.application().totalFileUrl()).endsWith("/files/99/download?scope=TOTAL");
assertThat(application.getCartonTotalFileId()).isEqualTo("99");
verify(files).upload("101","OVERSEAS_RELABEL_CARTON_TOTAL_DOCUMENT","11",7L,pdf);
verify(applications).updateById(application);
}
@Test void itemUploadBindsOwnCustomerApplicationAndDistinctCategory(){