@Test public void shouldValidateGivenConfigSourceName() { assertTrue(ConfigSource.isValid("UI")); assertTrue(ConfigSource.isValid(" file ")); assertFalse(ConfigSource.isValid("invalid")); }
public static boolean isValid(String name) { try { valueOf(name); return true; } catch (MotechConfigurationException e) { return false; } }
ConfigSource { public static boolean isValid(String name) { try { valueOf(name); return true; } catch (MotechConfigurationException e) { return false; } } }
ConfigSource { public static boolean isValid(String name) { try { valueOf(name); return true; } catch (MotechConfigurationException e) { return false; } } private  ConfigSource(String name); }
ConfigSource { public static boolean isValid(String name) { try { valueOf(name); return true; } catch (MotechConfigurationException e) { return false; } } private  ConfigSource(String name); static ConfigSource valueOf(String name); static boolean isValid(String name); @Override String toString(); String getName(); boolean isFile(); }
ConfigSource { public static boolean isValid(String name) { try { valueOf(name); return true; } catch (MotechConfigurationException e) { return false; } } private  ConfigSource(String name); static ConfigSource valueOf(String name); static boolean isValid(String name); @Override String toString(); String getName(); boolean isFile(); static final ConfigSource FILE; static final ConfigSource UI; }