@Test() public void testGetParametersByResourceTypeInCompartmentWhenEmptyCompartmentCache() { CompartmentCache cache = new CompartmentCache(); List<String> results = cache.getParametersByResourceTypeInCompartment(null); assertNotNull(results); assertTrue(results.isEmpty()); results = cache.getParametersByResourceTypeInCompartment("FudgeBrownie"); assertNotNull(results); assertTrue(results.isEmpty()); }
public List<String> getParametersByResourceTypeInCompartment(String resourceType) { List<String> results; if (resourceType != null && codeAndParams.containsKey(resourceType)) { results = Collections.unmodifiableList(codeAndParams.get(resourceType)); } else { results = Collections.unmodifiableList(Collections.emptyList()); } return results; }
CompartmentCache { public List<String> getParametersByResourceTypeInCompartment(String resourceType) { List<String> results; if (resourceType != null && codeAndParams.containsKey(resourceType)) { results = Collections.unmodifiableList(codeAndParams.get(resourceType)); } else { results = Collections.unmodifiableList(Collections.emptyList()); } return results; } }
CompartmentCache { public List<String> getParametersByResourceTypeInCompartment(String resourceType) { List<String> results; if (resourceType != null && codeAndParams.containsKey(resourceType)) { results = Collections.unmodifiableList(codeAndParams.get(resourceType)); } else { results = Collections.unmodifiableList(Collections.emptyList()); } return results; } CompartmentCache(); }
CompartmentCache { public List<String> getParametersByResourceTypeInCompartment(String resourceType) { List<String> results; if (resourceType != null && codeAndParams.containsKey(resourceType)) { results = Collections.unmodifiableList(codeAndParams.get(resourceType)); } else { results = Collections.unmodifiableList(Collections.emptyList()); } return results; } CompartmentCache(); void add(java.lang.String inclusionCode, List<com.ibm.fhir.model.type.String> params); List<String> getResourceTypesInCompartment(); List<String> getParametersByResourceTypeInCompartment(String resourceType); }
CompartmentCache { public List<String> getParametersByResourceTypeInCompartment(String resourceType) { List<String> results; if (resourceType != null && codeAndParams.containsKey(resourceType)) { results = Collections.unmodifiableList(codeAndParams.get(resourceType)); } else { results = Collections.unmodifiableList(Collections.emptyList()); } return results; } CompartmentCache(); void add(java.lang.String inclusionCode, List<com.ibm.fhir.model.type.String> params); List<String> getResourceTypesInCompartment(); List<String> getParametersByResourceTypeInCompartment(String resourceType);  }