public void setProperty(String name, String value) { // TODO Look at fake attributes if (name.equals("className")) { return; } // Determine the validity of the input property boolean validProperty = false; for (String gemfireProperty : AbstractDistributionConfig._getAttNames()) { if (name.equals(gemfireProperty)) { validProperty = true; break; } } // If it is a valid GemFire property, add it to the the GemFire properties. // Otherwise, log a warning. if (validProperty) { this.gemfireProperties.put(name, value); } else { getLogger().warn("The input property named " + name + " is not a valid GemFire property. It is being ignored."); } }
@Test public void testAttributeDesc() { String[] attNames = AbstractDistributionConfig._getAttNames(); for (String attName : attNames) { assertTrue("Does not contain description for attribute " + attName, AbstractDistributionConfig.dcAttDescriptions.containsKey(attName)); } List<String> attList = Arrays.asList(attNames); for (Object attName : AbstractDistributionConfig.dcAttDescriptions.keySet()) { if (!attList.contains(attName)) { System.out.println("Has unused description for " + attName.toString()); } } }
@Test public void testGetAttributeNames() { String[] attNames = AbstractDistributionConfig._getAttNames(); assertThat(attNames.length).isEqualTo(165);
public void setProperty(String name, String value) { // TODO Look at fake attributes if (name.equals("className")) { return; } // Determine the validity of the input property boolean validProperty = false; for (String gemfireProperty : AbstractDistributionConfig._getAttNames()) { if (name.equals(gemfireProperty)) { validProperty = true; break; } } // If it is a valid GemFire property, add it to the the GemFire properties. // Otherwise, log a warning. if (validProperty) { this.gemfireProperties.put(name, value); } else { getLogger().warn("The input property named " + name + " is not a valid GemFire property. It is being ignored."); } }