@Test public void buildTestNullToEmptyString() { final Arende arende = buildArende(); final WebCertUser skickatAv = buildWebCertUser(false); final String logiskAdressMottagare = "logical address"; SendMessageToRecipientType result = SendMessageToRecipientTypeBuilder.build(arende, skickatAv, logiskAdressMottagare); assertEquals("", result.getSkickatAv().getEnhet().getEnhetsnamn()); assertEquals("", result.getSkickatAv().getEnhet().getPostadress()); assertEquals("", result.getSkickatAv().getEnhet().getPostnummer()); assertEquals("", result.getSkickatAv().getEnhet().getPostort()); assertEquals("", result.getSkickatAv().getEnhet().getTelefonnummer()); assertNull(result.getSkickatAv().getEnhet().getEpost()); assertEquals("", result.getSkickatAv().getEnhet().getVardgivare().getVardgivarnamn()); }
public static SendMessageToRecipientType build(Arende arende, WebCertUser skickatAv, String logiskAdressMottagare) { SendMessageToRecipientType request = new SendMessageToRecipientType(); request.setAmne(buildAmne(arende)); request.setIntygsId(buildIntygId(arende)); request.setLogiskAdressMottagare(logiskAdressMottagare); request.setMeddelande(arende.getMeddelande()); request.setMeddelandeId(arende.getMeddelandeId()); request.setPaminnelseMeddelandeId(arende.getPaminnelseMeddelandeId()); request.setPatientPersonId(InternalConverterUtil.getPersonId(createPnr(arende.getPatientPersonId()))); request.setReferensId(arende.getReferensId()); request.setRubrik(arende.getRubrik()); request.setSistaDatumForSvar(arende.getSistaDatumForSvar()); request.setSkickatAv(buildHosPersonalFromWebCertUser(skickatAv)); request.setSkickatTidpunkt(arende.getSkickatTidpunkt()); decorateWithSvarPa(request, arende); return request; }
SendMessageToRecipientTypeBuilder { public static SendMessageToRecipientType build(Arende arende, WebCertUser skickatAv, String logiskAdressMottagare) { SendMessageToRecipientType request = new SendMessageToRecipientType(); request.setAmne(buildAmne(arende)); request.setIntygsId(buildIntygId(arende)); request.setLogiskAdressMottagare(logiskAdressMottagare); request.setMeddelande(arende.getMeddelande()); request.setMeddelandeId(arende.getMeddelandeId()); request.setPaminnelseMeddelandeId(arende.getPaminnelseMeddelandeId()); request.setPatientPersonId(InternalConverterUtil.getPersonId(createPnr(arende.getPatientPersonId()))); request.setReferensId(arende.getReferensId()); request.setRubrik(arende.getRubrik()); request.setSistaDatumForSvar(arende.getSistaDatumForSvar()); request.setSkickatAv(buildHosPersonalFromWebCertUser(skickatAv)); request.setSkickatTidpunkt(arende.getSkickatTidpunkt()); decorateWithSvarPa(request, arende); return request; } }
SendMessageToRecipientTypeBuilder { public static SendMessageToRecipientType build(Arende arende, WebCertUser skickatAv, String logiskAdressMottagare) { SendMessageToRecipientType request = new SendMessageToRecipientType(); request.setAmne(buildAmne(arende)); request.setIntygsId(buildIntygId(arende)); request.setLogiskAdressMottagare(logiskAdressMottagare); request.setMeddelande(arende.getMeddelande()); request.setMeddelandeId(arende.getMeddelandeId()); request.setPaminnelseMeddelandeId(arende.getPaminnelseMeddelandeId()); request.setPatientPersonId(InternalConverterUtil.getPersonId(createPnr(arende.getPatientPersonId()))); request.setReferensId(arende.getReferensId()); request.setRubrik(arende.getRubrik()); request.setSistaDatumForSvar(arende.getSistaDatumForSvar()); request.setSkickatAv(buildHosPersonalFromWebCertUser(skickatAv)); request.setSkickatTidpunkt(arende.getSkickatTidpunkt()); decorateWithSvarPa(request, arende); return request; } private  SendMessageToRecipientTypeBuilder(); }
SendMessageToRecipientTypeBuilder { public static SendMessageToRecipientType build(Arende arende, WebCertUser skickatAv, String logiskAdressMottagare) { SendMessageToRecipientType request = new SendMessageToRecipientType(); request.setAmne(buildAmne(arende)); request.setIntygsId(buildIntygId(arende)); request.setLogiskAdressMottagare(logiskAdressMottagare); request.setMeddelande(arende.getMeddelande()); request.setMeddelandeId(arende.getMeddelandeId()); request.setPaminnelseMeddelandeId(arende.getPaminnelseMeddelandeId()); request.setPatientPersonId(InternalConverterUtil.getPersonId(createPnr(arende.getPatientPersonId()))); request.setReferensId(arende.getReferensId()); request.setRubrik(arende.getRubrik()); request.setSistaDatumForSvar(arende.getSistaDatumForSvar()); request.setSkickatAv(buildHosPersonalFromWebCertUser(skickatAv)); request.setSkickatTidpunkt(arende.getSkickatTidpunkt()); decorateWithSvarPa(request, arende); return request; } private  SendMessageToRecipientTypeBuilder(); static SendMessageToRecipientType build(Arende arende, WebCertUser skickatAv, String logiskAdressMottagare); }
SendMessageToRecipientTypeBuilder { public static SendMessageToRecipientType build(Arende arende, WebCertUser skickatAv, String logiskAdressMottagare) { SendMessageToRecipientType request = new SendMessageToRecipientType(); request.setAmne(buildAmne(arende)); request.setIntygsId(buildIntygId(arende)); request.setLogiskAdressMottagare(logiskAdressMottagare); request.setMeddelande(arende.getMeddelande()); request.setMeddelandeId(arende.getMeddelandeId()); request.setPaminnelseMeddelandeId(arende.getPaminnelseMeddelandeId()); request.setPatientPersonId(InternalConverterUtil.getPersonId(createPnr(arende.getPatientPersonId()))); request.setReferensId(arende.getReferensId()); request.setRubrik(arende.getRubrik()); request.setSistaDatumForSvar(arende.getSistaDatumForSvar()); request.setSkickatAv(buildHosPersonalFromWebCertUser(skickatAv)); request.setSkickatTidpunkt(arende.getSkickatTidpunkt()); decorateWithSvarPa(request, arende); return request; } private  SendMessageToRecipientTypeBuilder(); static SendMessageToRecipientType build(Arende arende, WebCertUser skickatAv, String logiskAdressMottagare);  }