rx-preferences
rx-preferences copied to clipboard
Add MemoryPreference artifact?
I have rewritten MemoryPreference a few times in various projects for tests and mock mode.
public final class MemoryPreference<T> implements Preference<T> {
private final String key;
private final T defaultValue;
@Nullable private volatile T value;
...
}
Maybe there should be an artifact here for it?
Is there a strong reason to prefer a memory backed preference over just a normal preference?
Actually, I guess it might make sense if you're not using Robolectric.
Yes, I don't use Robolectric.
@NightlyNexus show full code, please =)
Is this still on the table? I basically have a small test class that i end up copying in every project I use this library in. Would be nice to have an official artifact. Happy to contribute a PR or continue on the existing one