@Test public void test_should_find_all_statuses() { when(complaintStatusJpaRepository.findAll()).thenReturn(getListOfComplaintStatusEntities()); List<org.egov.workflow.domain.model.ComplaintStatus> all = complaintStatusRepository.findAll(); assertThat(all.size()).isEqualTo(2); assertThat(all.get(0).getId()).isEqualTo(1L); assertThat(all.get(1).getId()).isEqualTo(2L); }
public List<org.egov.workflow.domain.model.ComplaintStatus> findAll() { return complaintStatusJpaRepository.findAll() .stream() .map(ComplaintStatus::toDomain) .collect(Collectors.toList()); }
ComplaintStatusRepository { public List<org.egov.workflow.domain.model.ComplaintStatus> findAll() { return complaintStatusJpaRepository.findAll() .stream() .map(ComplaintStatus::toDomain) .collect(Collectors.toList()); } }
ComplaintStatusRepository { public List<org.egov.workflow.domain.model.ComplaintStatus> findAll() { return complaintStatusJpaRepository.findAll() .stream() .map(ComplaintStatus::toDomain) .collect(Collectors.toList()); } ComplaintStatusRepository(ComplaintStatusJpaRepository complaintStatusJpaRepository); }
ComplaintStatusRepository { public List<org.egov.workflow.domain.model.ComplaintStatus> findAll() { return complaintStatusJpaRepository.findAll() .stream() .map(ComplaintStatus::toDomain) .collect(Collectors.toList()); } ComplaintStatusRepository(ComplaintStatusJpaRepository complaintStatusJpaRepository); List<org.egov.workflow.domain.model.ComplaintStatus> findAll(); org.egov.workflow.domain.model.ComplaintStatus findByName(String name); org.egov.workflow.domain.model.ComplaintStatus findByCodeAndTenantId(String code, String tenantId); }
ComplaintStatusRepository { public List<org.egov.workflow.domain.model.ComplaintStatus> findAll() { return complaintStatusJpaRepository.findAll() .stream() .map(ComplaintStatus::toDomain) .collect(Collectors.toList()); } ComplaintStatusRepository(ComplaintStatusJpaRepository complaintStatusJpaRepository); List<org.egov.workflow.domain.model.ComplaintStatus> findAll(); org.egov.workflow.domain.model.ComplaintStatus findByName(String name); org.egov.workflow.domain.model.ComplaintStatus findByCodeAndTenantId(String code, String tenantId);  }