@Test public void testPartCodeToFrageStallareKod() { assertEquals(FrageStallare.FORSAKRINGSKASSAN.getKod(), FragestallareConverterUtil .partToFrageStallarKod(PARTCODE_FKASSA)); assertEquals(FrageStallare.WEBCERT.getKod(), FragestallareConverterUtil .partToFrageStallarKod(PARTCODE_HSVARD)); }
public static String partToFrageStallarKod(String partCode) { try { PartToFragestallare partToFragestallare = PartToFragestallare.valueOf(partCode); FrageStallare ret = FrageStallare.getByKod(partToFragestallare.fragestallarKod); return ret.getKod(); } catch (IllegalArgumentException ie) { throw new WebCertServiceException(WebCertServiceErrorCodeEnum.INTERNAL_PROBLEM, "Invalid PartCode found when converting Arende"); } }
FragestallareConverterUtil { public static String partToFrageStallarKod(String partCode) { try { PartToFragestallare partToFragestallare = PartToFragestallare.valueOf(partCode); FrageStallare ret = FrageStallare.getByKod(partToFragestallare.fragestallarKod); return ret.getKod(); } catch (IllegalArgumentException ie) { throw new WebCertServiceException(WebCertServiceErrorCodeEnum.INTERNAL_PROBLEM, "Invalid PartCode found when converting Arende"); } } }
FragestallareConverterUtil { public static String partToFrageStallarKod(String partCode) { try { PartToFragestallare partToFragestallare = PartToFragestallare.valueOf(partCode); FrageStallare ret = FrageStallare.getByKod(partToFragestallare.fragestallarKod); return ret.getKod(); } catch (IllegalArgumentException ie) { throw new WebCertServiceException(WebCertServiceErrorCodeEnum.INTERNAL_PROBLEM, "Invalid PartCode found when converting Arende"); } } private  FragestallareConverterUtil(); }
FragestallareConverterUtil { public static String partToFrageStallarKod(String partCode) { try { PartToFragestallare partToFragestallare = PartToFragestallare.valueOf(partCode); FrageStallare ret = FrageStallare.getByKod(partToFragestallare.fragestallarKod); return ret.getKod(); } catch (IllegalArgumentException ie) { throw new WebCertServiceException(WebCertServiceErrorCodeEnum.INTERNAL_PROBLEM, "Invalid PartCode found when converting Arende"); } } private  FragestallareConverterUtil(); static String partToFrageStallarKod(String partCode); }
FragestallareConverterUtil { public static String partToFrageStallarKod(String partCode) { try { PartToFragestallare partToFragestallare = PartToFragestallare.valueOf(partCode); FrageStallare ret = FrageStallare.getByKod(partToFragestallare.fragestallarKod); return ret.getKod(); } catch (IllegalArgumentException ie) { throw new WebCertServiceException(WebCertServiceErrorCodeEnum.INTERNAL_PROBLEM, "Invalid PartCode found when converting Arende"); } } private  FragestallareConverterUtil(); static String partToFrageStallarKod(String partCode);  }