@Test public void testIsValid() throws InvalidMapBoxStyleException, JSONException { DataSourceConfig config1 = new DataSourceConfig(); Assert.assertFalse(config1.isValid()); DataSourceConfig config2 = new DataSourceConfig("test"); Assert.assertTrue(config2.isValid()); JSONObject object1 = new JSONObject(); object1.put(DataSourceConfig.KEY_NAME, "test"); DataSourceConfig config3 = new DataSourceConfig(object1); Assert.assertTrue(config3.isValid()); }
@Override public boolean isValid() { return !TextUtils.isEmpty(name); }
DataSourceConfig implements Config { @Override public boolean isValid() { return !TextUtils.isEmpty(name); } }
DataSourceConfig implements Config { @Override public boolean isValid() { return !TextUtils.isEmpty(name); } DataSourceConfig();  DataSourceConfig(@NonNull String name);  DataSourceConfig(JSONObject jsonObject); }
DataSourceConfig implements Config { @Override public boolean isValid() { return !TextUtils.isEmpty(name); } DataSourceConfig();  DataSourceConfig(@NonNull String name);  DataSourceConfig(JSONObject jsonObject); @Override boolean isValid(); String getName(); void setName(@NonNull String name); @Override JSONObject toJsonObject(); static String[] extractDataSourceNames(@NonNull ArrayList<DataSourceConfig> dataSourceConfigs); }
DataSourceConfig implements Config { @Override public boolean isValid() { return !TextUtils.isEmpty(name); } DataSourceConfig();  DataSourceConfig(@NonNull String name);  DataSourceConfig(JSONObject jsonObject); @Override boolean isValid(); String getName(); void setName(@NonNull String name); @Override JSONObject toJsonObject(); static String[] extractDataSourceNames(@NonNull ArrayList<DataSourceConfig> dataSourceConfigs); static final String KEY_NAME; }