Skip to content
Snippets Groups Projects
Commit ef6bf7e6 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5323 rename fromAttacheItem -> fromAttachedItem

parent 1880596e
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ interface DocumentMapper {
@Mapping(target = "clearField", ignore = true)
GrpcDocument toGrpcDocument(Document document);
default Document fromAttacheItem(AttachedItem attachedItem) {
default Document fromAttachedItem(AttachedItem attachedItem) {
return Document.builder()
.id(attachedItem.getId())
.type(MapUtils.getString(attachedItem.getItem(), Document.FIELD_DOCUMENT_TYPE))
......
......@@ -96,6 +96,6 @@ public class DocumentService {
}
public Document getDocument(String id) {
return documentMapper.fromAttacheItem(attachedItemService.getItem(id));
return documentMapper.fromAttachedItem(attachedItemService.getItem(id));
}
}
......@@ -60,7 +60,7 @@ class DocumentMapperTest {
documentItem.remove(Document.FIELD_NACHRICHT_SUBJECT);
var document = AttachedItemTestFactory.createDocumentBuilder().item(documentItem).build();
var result = mapper.fromAttacheItem(document);
var result = mapper.fromAttachedItem(document);
assertThat(result.getNachrichtSubject()).isEqualTo(StringUtils.EMPTY);
}
......@@ -71,7 +71,7 @@ class DocumentMapperTest {
documentItem.remove(Document.FIELD_NACHRICHT_TEXT);
var document = AttachedItemTestFactory.createDocumentBuilder().item(documentItem).build();
var result = mapper.fromAttacheItem(document);
var result = mapper.fromAttachedItem(document);
assertThat(result.getNachrichtText()).isEqualTo(StringUtils.EMPTY);
}
......
......@@ -313,13 +313,13 @@ class DocumentServiceTest {
service.getDocument(AttachedItemTestFactory.ID);
verify(documentMapper).fromAttacheItem(expectedItem);
verify(documentMapper).fromAttachedItem(expectedItem);
}
@Test
void shouldReturnDocument() {
var expectedDocument = DocumentTestFactory.create();
when(documentMapper.fromAttacheItem(any())).thenReturn(expectedDocument);
when(documentMapper.fromAttachedItem(any())).thenReturn(expectedDocument);
Document document = service.getDocument(AttachedItemTestFactory.ID);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment