Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
pkjacob committed Nov 22, 2024
1 parent d8e5c7f commit 0406954
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import static org.mockito.Mockito.when;

import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import org.folio.linked.data.domain.dto.InstanceField;
Expand Down Expand Up @@ -207,7 +208,7 @@ void getResourceIdByInventoryId_shouldThrowRequestProcessingException_ifNoEntity
void update_shouldSaveUpdatedResourceAndSendResourceUpdatedEvent_forResourceWithSameId() {
// given
var id = randomLong();
var workDto = new ResourceRequestDto().resource(new WorkField().work(new WorkRequest()));
var workDto = new ResourceRequestDto().resource(new WorkField().work(new WorkRequest(List.of())));
var oldWork = new Resource().setId(id).addTypes(WORK).setLabel("oldWork");
when(resourceRepo.findById(id)).thenReturn(Optional.of(oldWork));
var work = new Resource().setId(id).setLabel("saved").addTypes(WORK);
Expand Down Expand Up @@ -237,7 +238,7 @@ void update_shouldSaveUpdatedResourceAndSendReplaceEvent_forResourceWithDifferen
when(resourceRepo.findById(oldId)).thenReturn(Optional.of(oldInstance));
var mapped = new Resource().setId(newId).setLabel("mapped");
var instanceDto =
new ResourceRequestDto().resource(new InstanceField().instance(new InstanceRequest()));
new ResourceRequestDto().resource(new InstanceField().instance(new InstanceRequest(List.of())));
when(resourceDtoMapper.toEntity(instanceDto)).thenReturn(mapped);
var persisted = new Resource().setId(newId).setLabel("saved");
var expectedDto = new ResourceResponseDto().resource(
Expand Down

0 comments on commit 0406954

Please sign in to comment.