use of se.inera.intyg.common.support.modules.support.api.notification.FragorOchSvar in project webcert by sklintyg.
the class FragorOchSvarCreatorTest method testPerformCountHan8.
@Test
public void testPerformCountHan8() {
when(fragaSvarRepository.findFragaSvarStatusesForIntyg(INTYG_ID)).thenReturn(Collections.singletonList(new FragaSvarStatus(1L, FRAGESTALLARE_WEBCERT, null, Status.PENDING_EXTERNAL_ACTION)));
FragorOchSvar fos = fsCreator.createFragorOchSvar(INTYG_ID);
assertNotNull(fos);
assertEquals(0, fos.getAntalFragor());
assertEquals(0, fos.getAntalHanteradeFragor());
assertEquals(0, fos.getAntalSvar());
assertEquals(0, fos.getAntalHanteradeSvar());
verify(fragaSvarRepository).findFragaSvarStatusesForIntyg(INTYG_ID);
verifyNoMoreInteractions(fragaSvarRepository);
verifyNoMoreInteractions(arendeRepository);
}
use of se.inera.intyg.common.support.modules.support.api.notification.FragorOchSvar in project webcert by sklintyg.
the class FragorOchSvarCreatorImpl method createFragorOchSvar.
/*
* (non-Javadoc)
*
* @see se.inera.intyg.webcert.web.service.notification.FragorOchSvarCreator#
* createFragorOchSvar(java.lang.String)
*/
@Override
public FragorOchSvar createFragorOchSvar(String intygsId) {
FragorOchSvar fs = performCount(fragaSvarRepository.findFragaSvarStatusesForIntyg(intygsId));
LOG.debug("Created FragorOchSvar ({}) for intyg {}", fs.toString(), intygsId);
return fs;
}
Aggregations