@Test public void testcheckConsentSignedStatus_when_consent_has_not_reviewed() { Set<Consent> consents = new HashSet<Consent>(); Consent consent = mock(Consent.class); consents.add(consent); when(consent.getSignedPdfConsent()).thenReturn(null); boolean result = nst.checkConsentSignedStatus(consents); assertEquals(false, result); }
@Override public boolean checkConsentSignedStatus(Set<Consent> consents) { if (consents.size() == 0) return false; for (Consent consent : consents) { if (consent.getSignedPdfConsent() != null) { if (consent.getSignedPdfConsent().getSignedPdfConsentContent() != null) return true; } } return false; }
NotificationServiceImpl implements NotificationService { @Override public boolean checkConsentSignedStatus(Set<Consent> consents) { if (consents.size() == 0) return false; for (Consent consent : consents) { if (consent.getSignedPdfConsent() != null) { if (consent.getSignedPdfConsent().getSignedPdfConsentContent() != null) return true; } } return false; } }
NotificationServiceImpl implements NotificationService { @Override public boolean checkConsentSignedStatus(Set<Consent> consents) { if (consents.size() == 0) return false; for (Consent consent : consents) { if (consent.getSignedPdfConsent() != null) { if (consent.getSignedPdfConsent().getSignedPdfConsentContent() != null) return true; } } return false; } NotificationServiceImpl(PatientRepository patientRepository); }
NotificationServiceImpl implements NotificationService { @Override public boolean checkConsentSignedStatus(Set<Consent> consents) { if (consents.size() == 0) return false; for (Consent consent : consents) { if (consent.getSignedPdfConsent() != null) { if (consent.getSignedPdfConsent().getSignedPdfConsentContent() != null) return true; } } return false; } NotificationServiceImpl(PatientRepository patientRepository); @Override String notificationStage(String username, String notify); @Override boolean checkConsentReviewStatus(Set<Consent> consents); @Override boolean checkConsentSignedStatus(Set<Consent> consents); @Override String notificationValuesetMgmt(String username, String notify,
			String message); }
NotificationServiceImpl implements NotificationService { @Override public boolean checkConsentSignedStatus(Set<Consent> consents) { if (consents.size() == 0) return false; for (Consent consent : consents) { if (consent.getSignedPdfConsent() != null) { if (consent.getSignedPdfConsent().getSignedPdfConsentContent() != null) return true; } } return false; } NotificationServiceImpl(PatientRepository patientRepository); @Override String notificationStage(String username, String notify); @Override boolean checkConsentReviewStatus(Set<Consent> consents); @Override boolean checkConsentSignedStatus(Set<Consent> consents); @Override String notificationValuesetMgmt(String username, String notify,
			String message);  }