Merge branch 'RED-9413-bp' into 'release/4.190.x'
RED-9413: backport: fixed date issue See merge request redactmanager/redaction-service!443
This commit is contained in:
commit
c479df124d
@ -1,3 +1,7 @@
|
||||
yyyy MMM dd
|
||||
yyyy MMM d
|
||||
yyyy MM dd
|
||||
yyyy MM d
|
||||
dd-MMM-yyyy
|
||||
d-MMM-yyyy
|
||||
dd MMM yyyy
|
||||
@ -30,8 +34,6 @@ yyyy, MMMM dd
|
||||
yyyy, MMMM d
|
||||
yyyy.MM.dd
|
||||
yyyy.MM.d
|
||||
yyyyMMdd
|
||||
yyyyMMd
|
||||
dd-MM-yy
|
||||
d-MM-yy
|
||||
dd/MM/yy
|
||||
@ -70,5 +72,3 @@ dd.MM.yy
|
||||
d.MM.yy
|
||||
dd MMM. yyyy
|
||||
d MMM. yyyy
|
||||
yyyy MMM dd
|
||||
yyyy MMM d
|
||||
@ -6,6 +6,7 @@ import static org.mockito.Mockito.when;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileType;
|
||||
@ -121,14 +122,28 @@ public class DocumineFloraTest extends AbstractRedactionIntegrationTest {
|
||||
var componentLog = redactionStorageService.getComponentLog(TEST_DOSSIER_ID, TEST_FILE_ID);
|
||||
assertNotNull(componentLog);
|
||||
|
||||
var experimentalDates = componentLog.getComponentLogEntries().stream().filter(c -> c.getName().equals("Experimental_Starting_Date")).findFirst().get();
|
||||
var experimentalDates = componentLog.getComponentLogEntries()
|
||||
.stream()
|
||||
.filter(c -> c.getName().equals("Experimental_Starting_Date"))
|
||||
.findFirst()
|
||||
.get();
|
||||
assertNotNull(experimentalDates);
|
||||
|
||||
String dates = experimentalDates.getComponentValues().get(0).getValue();
|
||||
List<String> expectedDates = new ArrayList<>();
|
||||
expectedDates.add("10/01/2022");
|
||||
expectedDates.add("01/01/2022");
|
||||
expectedDates.add("08/09/2024");
|
||||
expectedDates.add("03/01/2022");
|
||||
expectedDates.add("03/08/1992");
|
||||
expectedDates.add("13/08/1992");
|
||||
expectedDates.add("27/02/1992");
|
||||
|
||||
String dates = experimentalDates.getComponentValues()
|
||||
.get(0).getValue();
|
||||
String[] dateArray = dates.split(", ");
|
||||
boolean allEqual = true;
|
||||
for (String date : dateArray) {
|
||||
if (!"10/01/2022".equals(date) && !"08/09/2024".equals(date)) {
|
||||
if (!expectedDates.contains(date)) {
|
||||
allEqual = false;
|
||||
break;
|
||||
}
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user