@Test public void testVerifyIsNotSentEmptyMottagare() throws Exception { Utkast utkast = mock(Utkast.class); doReturn("").when(utkast).getSkickadTillMottagare(); verifyIsNotSent(utkast, IntygOperation.SEND); }
public static void verifyIsNotSent(final Utkast intyg, final IntygServiceImpl.IntygOperation operation) { if (intyg.getSkickadTillMottagare() != null && intyg.getSkickadTillMottagare().trim().length() > 0) { intygAlreadySentError(intyg.getIntygsId(), operation.getValue()); } }
IntygVerificationHelper { public static void verifyIsNotSent(final Utkast intyg, final IntygServiceImpl.IntygOperation operation) { if (intyg.getSkickadTillMottagare() != null && intyg.getSkickadTillMottagare().trim().length() > 0) { intygAlreadySentError(intyg.getIntygsId(), operation.getValue()); } } }
IntygVerificationHelper { public static void verifyIsNotSent(final Utkast intyg, final IntygServiceImpl.IntygOperation operation) { if (intyg.getSkickadTillMottagare() != null && intyg.getSkickadTillMottagare().trim().length() > 0) { intygAlreadySentError(intyg.getIntygsId(), operation.getValue()); } } private  IntygVerificationHelper(); }
IntygVerificationHelper { public static void verifyIsNotSent(final Utkast intyg, final IntygServiceImpl.IntygOperation operation) { if (intyg.getSkickadTillMottagare() != null && intyg.getSkickadTillMottagare().trim().length() > 0) { intygAlreadySentError(intyg.getIntygsId(), operation.getValue()); } } private  IntygVerificationHelper(); static void verifyIsNotSent(final Utkast intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsNotSent(final CertificateResponse certificate, final IntygServiceImpl.IntygOperation operation); static void verifyIsSigned(final IntygContentHolder intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsSigned(final Utkast intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsSigned(final CertificateResponse certificate, final IntygServiceImpl.IntygOperation operation); static void verifyIsNotRevoked(final IntygContentHolder intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsNotRevoked(final Utkast intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsNotRevoked(final CertificateResponse certificate, final IntygServiceImpl.IntygOperation operation); }
IntygVerificationHelper { public static void verifyIsNotSent(final Utkast intyg, final IntygServiceImpl.IntygOperation operation) { if (intyg.getSkickadTillMottagare() != null && intyg.getSkickadTillMottagare().trim().length() > 0) { intygAlreadySentError(intyg.getIntygsId(), operation.getValue()); } } private  IntygVerificationHelper(); static void verifyIsNotSent(final Utkast intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsNotSent(final CertificateResponse certificate, final IntygServiceImpl.IntygOperation operation); static void verifyIsSigned(final IntygContentHolder intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsSigned(final Utkast intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsSigned(final CertificateResponse certificate, final IntygServiceImpl.IntygOperation operation); static void verifyIsNotRevoked(final IntygContentHolder intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsNotRevoked(final Utkast intyg, final IntygServiceImpl.IntygOperation operation); static void verifyIsNotRevoked(final CertificateResponse certificate, final IntygServiceImpl.IntygOperation operation);  }