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

OZG-6510 implement comments from code review

parent 396b86ec
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,7 @@ class EingangFilesRepositoryITCase {
.build())
.build());
var result = repository.findAttachments(vorgang.getId(), Optional.ofNullable(eingangId));
var result = repository.findAttachments(vorgang.getId(), Optional.of(eingangId));
assertThat(result).hasSize(3);
}
......@@ -210,7 +210,7 @@ class EingangFilesRepositoryITCase {
var vorgang = mongoOperations.save(VorgangTestFactory.createBuilder().id(null).version(0L).clearEingangs()
.eingang(EingangTestFactory.createBuilder().id(eingangId).representation(IncomingFileTestFactory.create()).build()).build());
var result = repository.findRepresentations(vorgang.getId(), Optional.ofNullable(eingangId));
var result = repository.findRepresentations(vorgang.getId(), Optional.of(eingangId));
assertThat(result).hasSize(2);
}
......
......@@ -172,7 +172,7 @@ class FileServiceTest {
class TestGetAttachments {
@Test
void shouldCallCheckPermissions() {
void shouldCallCheckPermission() {
getAttachments();
verify(policyService).checkPermission(VorgangTestFactory.ID);
......@@ -182,7 +182,7 @@ class FileServiceTest {
void shouldCallFindAttachments() {
getAttachments();
verify(repository).findAttachments(VorgangTestFactory.ID, Optional.ofNullable(EingangTestFactory.ID));
verify(repository).findAttachments(VorgangTestFactory.ID, Optional.of(EingangTestFactory.ID));
}
@Test
......@@ -196,7 +196,7 @@ class FileServiceTest {
}
private List<OzgFile> getAttachments() {
return service.getAttachments(VorgangTestFactory.ID, Optional.ofNullable(EingangTestFactory.ID));
return service.getAttachments(VorgangTestFactory.ID, Optional.of(EingangTestFactory.ID));
}
}
......@@ -204,7 +204,7 @@ class FileServiceTest {
class TestGetRepresentations {
@Test
void shouldCallCheckPermissions() {
void shouldCallCheckPermission() {
getRepresentations();
verify(policyService).checkPermission(VorgangTestFactory.ID);
......@@ -214,7 +214,7 @@ class FileServiceTest {
void shouldCallFindRepresentations() {
getRepresentations();
verify(repository).findRepresentations(VorgangTestFactory.ID, Optional.ofNullable(EingangTestFactory.ID));
verify(repository).findRepresentations(VorgangTestFactory.ID, Optional.of(EingangTestFactory.ID));
}
@Test
......@@ -228,7 +228,7 @@ class FileServiceTest {
}
private List<OzgFile> getRepresentations() {
return service.getRepresentations(VorgangTestFactory.ID, Optional.ofNullable(EingangTestFactory.ID));
return service.getRepresentations(VorgangTestFactory.ID, Optional.of(EingangTestFactory.ID));
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment