Skip to content

Commit

Permalink
DMP-4813 Change update metadata from OffsetDateTime to String so date…
Browse files Browse the repository at this point in the history
… is in expected format

Changed the update metadata request from OffsetDateTime to a formatted string so the output is in the expected format
  • Loading branch information
karen-hedges committed Feb 26, 2025
1 parent e8b0021 commit f6c605a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MapToMediaArchiveRecordTest {

@BeforeEach
void setUp() {
when(configuration.getDateTimeFormat()).thenReturn("yyyy-MM-dd'T'HH:mm:ssX");
when(configuration.getDateTimeFormat()).thenReturn("yyyy-MM-dd'T'HH:mm:ss.SSSX");
when(configuration.getDateFormat()).thenReturn("yyyy-MM-dd");

propertyFileLoader = mockStatic(PropertyFileLoader.class);
Expand All @@ -65,13 +65,13 @@ void shouldProduceRecordMetadata_withRetConfScore_whenSuppliedWithRetConfScore()
TestExternalObjectDirectoryEntity externalObjectDirectoryEntity = PersistableFactory.getExternalObjectDirectoryTestData()
.someMinimalBuilder()
.media(PersistableFactory.getMediaTestData()
.someMinimalBuilder().retConfScore(RetentionConfidenceScoreEnum.CASE_PERFECTLY_CLOSED)
.build())
.someMinimalBuilder().retConfScore(RetentionConfidenceScoreEnum.CASE_PERFECTLY_CLOSED)
.build())
.build();

// When
MediaArchiveRecord mediaArchiveRecord = mediaArchiveRecordMapper.mapToMediaArchiveRecord(externalObjectDirectoryEntity,
"someFilename");
"someFilename");

// Then
assertEquals(RetentionConfidenceScoreEnum.CASE_PERFECTLY_CLOSED.getId(),
Expand All @@ -84,13 +84,13 @@ void shouldProduceRecordMetadata_withNullRetConfScore_whenSuppliedWithNullRetCon
TestExternalObjectDirectoryEntity externalObjectDirectoryEntity = PersistableFactory.getExternalObjectDirectoryTestData()
.someMinimalBuilder()
.media(PersistableFactory.getMediaTestData()
.someMinimalBuilder().retConfScore(null)
.build())
.someMinimalBuilder().retConfScore(null)
.build())
.build();

// When
MediaArchiveRecord mediaArchiveRecord = mediaArchiveRecordMapper.mapToMediaArchiveRecord(externalObjectDirectoryEntity,
"someFilename");
"someFilename");

// Then
assertNull(mediaArchiveRecord.getMediaCreateArchiveRecord().getRecordMetadata().getRetentionConfidenceScore());
Expand Down

0 comments on commit f6c605a

Please sign in to comment.