@Test(dataProvider = "keyData") public void testSetAndGet(String keyToSet, String keyToGet) { DriverConfiguration conf = new DriverConfiguration(DRIVER_TYPE, MockDriver.class); conf.set(keyToSet, VALUE); assertEquals(conf.get(keyToGet), VALUE); }
@Override public String get(String name) { String[] prefixes = new String[]{DRIVER_PFX + driverType + ".", DRIVER_PFX + driverClassType + ".", DRIVER_PFX, }; for (String prefix : prefixes) { if (name.startsWith(prefix)) { return getInternal(name.substring(prefix.length())); } } return getInternal(name); }
DriverConfiguration extends Configuration { @Override public String get(String name) { String[] prefixes = new String[]{DRIVER_PFX + driverType + ".", DRIVER_PFX + driverClassType + ".", DRIVER_PFX, }; for (String prefix : prefixes) { if (name.startsWith(prefix)) { return getInternal(name.substring(prefix.length())); } } return getInternal(name); } }
DriverConfiguration extends Configuration { @Override public String get(String name) { String[] prefixes = new String[]{DRIVER_PFX + driverType + ".", DRIVER_PFX + driverClassType + ".", DRIVER_PFX, }; for (String prefix : prefixes) { if (name.startsWith(prefix)) { return getInternal(name.substring(prefix.length())); } } return getInternal(name); } DriverConfiguration(Configuration conf, String driverType, Class<? extends AbstractLensDriver> driverClass);  DriverConfiguration(String driverType, Class<? extends AbstractLensDriver> driverClass); }
DriverConfiguration extends Configuration { @Override public String get(String name) { String[] prefixes = new String[]{DRIVER_PFX + driverType + ".", DRIVER_PFX + driverClassType + ".", DRIVER_PFX, }; for (String prefix : prefixes) { if (name.startsWith(prefix)) { return getInternal(name.substring(prefix.length())); } } return getInternal(name); } DriverConfiguration(Configuration conf, String driverType, Class<? extends AbstractLensDriver> driverClass);  DriverConfiguration(String driverType, Class<? extends AbstractLensDriver> driverClass); @Override String get(String name); String getInternal(String name); }
DriverConfiguration extends Configuration { @Override public String get(String name) { String[] prefixes = new String[]{DRIVER_PFX + driverType + ".", DRIVER_PFX + driverClassType + ".", DRIVER_PFX, }; for (String prefix : prefixes) { if (name.startsWith(prefix)) { return getInternal(name.substring(prefix.length())); } } return getInternal(name); } DriverConfiguration(Configuration conf, String driverType, Class<? extends AbstractLensDriver> driverClass);  DriverConfiguration(String driverType, Class<? extends AbstractLensDriver> driverClass); @Override String get(String name); String getInternal(String name);  }