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

OZG-4994 OZG-5061 add statistic value

parent b9241040
No related branches found
No related tags found
No related merge requests found
...@@ -12,4 +12,5 @@ public class Statistic { ...@@ -12,4 +12,5 @@ public class Statistic {
private ByStatus byStatus; private ByStatus byStatus;
private int wiedervorlagen; private int wiedervorlagen;
private boolean existsWiedervorlageOverdue; private boolean existsWiedervorlageOverdue;
private int unreadMessages;
} }
...@@ -48,6 +48,7 @@ class StatisticService { ...@@ -48,6 +48,7 @@ class StatisticService {
return Statistic.builder() return Statistic.builder()
.existsWiedervorlageOverdue(getBooleanResult(response, StatisticRemoteService.EXISTS_WIEDERVORLAGE_OVERDUE_RESULT_NAME)) .existsWiedervorlageOverdue(getBooleanResult(response, StatisticRemoteService.EXISTS_WIEDERVORLAGE_OVERDUE_RESULT_NAME))
.wiedervorlagen(getIntResult(response, StatisticRemoteService.COUNT_WIEDERVORLAGE_NEXT_FRIST_RESULT_NAME)) .wiedervorlagen(getIntResult(response, StatisticRemoteService.COUNT_WIEDERVORLAGE_NEXT_FRIST_RESULT_NAME))
.unreadMessages(getIntResult(response, StatisticRemoteService.COUNT_VORGAENGE_WITH_UNREAD_MESSAGES_RESULT_NAME))
.byStatus(ByStatus.builder() .byStatus(ByStatus.builder()
.neu(getIntResult(response, remoteService.buildCountByStatusResultName(VorgangStatus.NEU))) .neu(getIntResult(response, remoteService.buildCountByStatusResultName(VorgangStatus.NEU)))
.abgeschlossen(getIntResult(response, remoteService.buildCountByStatusResultName(VorgangStatus.ABGESCHLOSSEN))) .abgeschlossen(getIntResult(response, remoteService.buildCountByStatusResultName(VorgangStatus.ABGESCHLOSSEN)))
......
...@@ -138,6 +138,14 @@ class StatisticServiceTest { ...@@ -138,6 +138,14 @@ class StatisticServiceTest {
assertThat(statistic.getByStatus().getNeu()).isZero(); assertThat(statistic.getByStatus().getNeu()).isZero();
} }
@Test
void shouldContainUnreadMessages() {
var statistic = service.buildGetVorgaengeStatisticResult(
Map.of(COUNT_VORGAENGE_WITH_UNREAD_MESSAGES_RESULT_NAME, StatisticResultTestFactory.create()));
assertThat(statistic.getUnreadMessages()).isEqualTo(StatisticResultTestFactory.INT_VALUE);
}
} }
@Nested @Nested
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment