@Test(expectedExceptions = { FHIRSearchException.class }) public void testCheckInvalidCompartmentAndResourceNotExist() throws FHIRSearchException { CompartmentUtil.checkValidCompartmentAndResource("Patient", "FrenchFood"); }
public static void checkValidCompartmentAndResource(final String compartment, final String resourceType) throws FHIRSearchException { checkValidCompartment(compartment); if (compartmentMap.get(compartment).getParametersByResourceTypeInCompartment(resourceType).isEmpty()) { String msg = String.format(INVALID_COMPARTMENT_AND_RESOURCE, resourceType, compartment); throw SearchExceptionUtil.buildNewInvalidSearchException(msg); } }
CompartmentUtil { public static void checkValidCompartmentAndResource(final String compartment, final String resourceType) throws FHIRSearchException { checkValidCompartment(compartment); if (compartmentMap.get(compartment).getParametersByResourceTypeInCompartment(resourceType).isEmpty()) { String msg = String.format(INVALID_COMPARTMENT_AND_RESOURCE, resourceType, compartment); throw SearchExceptionUtil.buildNewInvalidSearchException(msg); } } }
CompartmentUtil { public static void checkValidCompartmentAndResource(final String compartment, final String resourceType) throws FHIRSearchException { checkValidCompartment(compartment); if (compartmentMap.get(compartment).getParametersByResourceTypeInCompartment(resourceType).isEmpty()) { String msg = String.format(INVALID_COMPARTMENT_AND_RESOURCE, resourceType, compartment); throw SearchExceptionUtil.buildNewInvalidSearchException(msg); } } private  CompartmentUtil(); }
CompartmentUtil { public static void checkValidCompartmentAndResource(final String compartment, final String resourceType) throws FHIRSearchException { checkValidCompartment(compartment); if (compartmentMap.get(compartment).getParametersByResourceTypeInCompartment(resourceType).isEmpty()) { String msg = String.format(INVALID_COMPARTMENT_AND_RESOURCE, resourceType, compartment); throw SearchExceptionUtil.buildNewInvalidSearchException(msg); } } private  CompartmentUtil(); static void init(); static final Map<String, CompartmentCache> buildCompartmentMap(); static List<String> getCompartmentResourceTypes(final String compartment); static List<String> getCompartmentResourceTypeInclusionCriteria(final String compartment, final String resourceType); static void checkValidCompartment(final String compartment); static void checkValidCompartmentAndResource(final String compartment, final String resourceType); static void buildCompositeBundle(PrintStream out); }
CompartmentUtil { public static void checkValidCompartmentAndResource(final String compartment, final String resourceType) throws FHIRSearchException { checkValidCompartment(compartment); if (compartmentMap.get(compartment).getParametersByResourceTypeInCompartment(resourceType).isEmpty()) { String msg = String.format(INVALID_COMPARTMENT_AND_RESOURCE, resourceType, compartment); throw SearchExceptionUtil.buildNewInvalidSearchException(msg); } } private  CompartmentUtil(); static void init(); static final Map<String, CompartmentCache> buildCompartmentMap(); static List<String> getCompartmentResourceTypes(final String compartment); static List<String> getCompartmentResourceTypeInclusionCriteria(final String compartment, final String resourceType); static void checkValidCompartment(final String compartment); static void checkValidCompartmentAndResource(final String compartment, final String resourceType); static void buildCompositeBundle(PrintStream out); static final String FHIR_PATH_BUNDLE_ENTRY; static final String RESOURCE; static final String PARSE_EXCEPTION; static final String IO_EXCEPTION; static final String INVALID_COMPARTMENT; static final String INVALID_COMPARTMENT_AND_RESOURCE; static final String FROM_STREAM; }