@Test public void getTranslatedMessageFromVitamCodeWrongParametersTest() { try { VitamCodeHelper.getParametrizedMessageFromVitamCode(null, null); fail("Must thrown an IllegalArgumentException"); } catch (final IllegalArgumentException exc) { } try { VitamCodeHelper.getParametrizedMessageFromVitamCode(VitamCode.TEST, null); fail("Must thrown an IllegalArgumentException"); } catch (final IllegalArgumentException exc) { } }
public static String getParametrizedMessageFromVitamCode(VitamCode vitamCode, Object... params) { ParametersChecker.checkParameter(INVALID_ARGUMENT_TO_RETRIEVE_ERROR_MESSAGE, vitamCode, params); return String.format(vitamCode.getMessage(), params); }
VitamCodeHelper { public static String getParametrizedMessageFromVitamCode(VitamCode vitamCode, Object... params) { ParametersChecker.checkParameter(INVALID_ARGUMENT_TO_RETRIEVE_ERROR_MESSAGE, vitamCode, params); return String.format(vitamCode.getMessage(), params); } }
VitamCodeHelper { public static String getParametrizedMessageFromVitamCode(VitamCode vitamCode, Object... params) { ParametersChecker.checkParameter(INVALID_ARGUMENT_TO_RETRIEVE_ERROR_MESSAGE, vitamCode, params); return String.format(vitamCode.getMessage(), params); } private  VitamCodeHelper(); }
VitamCodeHelper { public static String getParametrizedMessageFromVitamCode(VitamCode vitamCode, Object... params) { ParametersChecker.checkParameter(INVALID_ARGUMENT_TO_RETRIEVE_ERROR_MESSAGE, vitamCode, params); return String.format(vitamCode.getMessage(), params); } private  VitamCodeHelper(); static boolean isAlphanumericCode(String code); static VitamCode getFrom(String code); static VitamCode getFrom(ServiceName service, DomainName domain, String item); static String getMessage(ServiceName service, DomainName domain, String item); static String getMessageFromVitamCode(VitamCode vitamCode); static String getMessage(String vitamCode); static String getParametrizedMessageFromVitamCode(VitamCode vitamCode, Object... params); static String getParametrizedMessageFromCode(String vitamCode, Object... params); static String getParametrizedMessage(ServiceName service, DomainName domain, String item, Object... params); static List<VitamCode> getFromDomain(DomainName domain); static List<VitamCode> getFromService(ServiceName service); static String getCode(VitamCode vitamCode); static String getLogMessage(VitamCode vitamCode, Object... params); static VitamError toVitamError(VitamCode vitamCode, String description); }
VitamCodeHelper { public static String getParametrizedMessageFromVitamCode(VitamCode vitamCode, Object... params) { ParametersChecker.checkParameter(INVALID_ARGUMENT_TO_RETRIEVE_ERROR_MESSAGE, vitamCode, params); return String.format(vitamCode.getMessage(), params); } private  VitamCodeHelper(); static boolean isAlphanumericCode(String code); static VitamCode getFrom(String code); static VitamCode getFrom(ServiceName service, DomainName domain, String item); static String getMessage(ServiceName service, DomainName domain, String item); static String getMessageFromVitamCode(VitamCode vitamCode); static String getMessage(String vitamCode); static String getParametrizedMessageFromVitamCode(VitamCode vitamCode, Object... params); static String getParametrizedMessageFromCode(String vitamCode, Object... params); static String getParametrizedMessage(ServiceName service, DomainName domain, String item, Object... params); static List<VitamCode> getFromDomain(DomainName domain); static List<VitamCode> getFromService(ServiceName service); static String getCode(VitamCode vitamCode); static String getLogMessage(VitamCode vitamCode, Object... params); static VitamError toVitamError(VitamCode vitamCode, String description);  }