Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected static void validateCommonParameters(CommonParameters parameters) {
- String COMMON_PARAMETERS = "commonParameters";
- String LOCALE = "locale";
- if (parameters == null || parameters.getLocale() == null || "".equals(parameters.getLocale()))
- throw new ParameterNotFoundException(COMMON_PARAMETERS, LOCALE);
- }
- @Test
- void test_validateCommonParameters_fail() {
- CommonParameters commonParameters = new CommonParameters();
- Throwable thrown = assertThrows(ParameterNotFoundException.class,
- () -> ParametersValidator.validateCommonParameters(commonParameters));
- assertNotNull(thrown.getMessage());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement