@Test void checkRequiredParametersForManagedServiceWithNoParameters() { Map<String, Object> dummyParameters = new HashMap<>(); ResourceType resourceType = ResourceType.MANAGED_SERVICE; Assertions.assertThrows(ContentException.class, () -> SpecialResourceTypesRequiredParametersUtil.checkRequiredParameters(testServiceName, resourceType, dummyParameters)); }
public static void checkRequiredParameters(String serviceName, ResourceType resourceType, Map<String, Object> parameters) { Set<String> requiredParameters = resourceType.getRequiredParameters(); for (String parameter : requiredParameters) { if (!parameters.containsKey(parameter)) { throw new ContentException(Messages.SERVICE_MISSING_REQUIRED_PARAMETER, serviceName, parameter); } } }
SpecialResourceTypesRequiredParametersUtil { public static void checkRequiredParameters(String serviceName, ResourceType resourceType, Map<String, Object> parameters) { Set<String> requiredParameters = resourceType.getRequiredParameters(); for (String parameter : requiredParameters) { if (!parameters.containsKey(parameter)) { throw new ContentException(Messages.SERVICE_MISSING_REQUIRED_PARAMETER, serviceName, parameter); } } } }
SpecialResourceTypesRequiredParametersUtil { public static void checkRequiredParameters(String serviceName, ResourceType resourceType, Map<String, Object> parameters) { Set<String> requiredParameters = resourceType.getRequiredParameters(); for (String parameter : requiredParameters) { if (!parameters.containsKey(parameter)) { throw new ContentException(Messages.SERVICE_MISSING_REQUIRED_PARAMETER, serviceName, parameter); } } } private  SpecialResourceTypesRequiredParametersUtil(); }
SpecialResourceTypesRequiredParametersUtil { public static void checkRequiredParameters(String serviceName, ResourceType resourceType, Map<String, Object> parameters) { Set<String> requiredParameters = resourceType.getRequiredParameters(); for (String parameter : requiredParameters) { if (!parameters.containsKey(parameter)) { throw new ContentException(Messages.SERVICE_MISSING_REQUIRED_PARAMETER, serviceName, parameter); } } } private  SpecialResourceTypesRequiredParametersUtil(); static void checkRequiredParameters(String serviceName, ResourceType resourceType, Map<String, Object> parameters); }
SpecialResourceTypesRequiredParametersUtil { public static void checkRequiredParameters(String serviceName, ResourceType resourceType, Map<String, Object> parameters) { Set<String> requiredParameters = resourceType.getRequiredParameters(); for (String parameter : requiredParameters) { if (!parameters.containsKey(parameter)) { throw new ContentException(Messages.SERVICE_MISSING_REQUIRED_PARAMETER, serviceName, parameter); } } } private  SpecialResourceTypesRequiredParametersUtil(); static void checkRequiredParameters(String serviceName, ResourceType resourceType, Map<String, Object> parameters);  }