Skip to content

Instantly share code, notes, and snippets.

@fzakaria
Created September 23, 2014 21:37
Show Gist options
  • Save fzakaria/67f4cc7b36a97627b28c to your computer and use it in GitHub Desktop.
Save fzakaria/67f4cc7b36a97627b28c to your computer and use it in GitHub Desktop.
Something like this
//You'd create this helper AuthoratativePropertilesFileAccessor that would wire in
// SqlitePropertiesAccessor. Once it's proven that the test is valid we can simply
// delete this class and wire in immediately SqlitePropertiesAccessor
public AuthoratativePropertilesFileAccessor implements PropertiesFileAccessor {
private final PropertiesFileAccessor authoriative;
private final PropertiesFileAccessor test;
public String getProperty(String key) {
String valueAuth = authorative.getProperty(key);
String valueTest = authoritative.getProperty(key);
emitEventIfNotEqual(valueAuth,valueTest);
return valueAuth;
}
}
public SqlitePropertiesAccessor implements PropertiesFileAccessor {
//
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment