
On Mar 11, 2010, at 8:32 AM, Krzysztof KosiĆski wrote:
Forgot one thing: Jon, you could fix this bug, because it was introduced by your fix to the preferences bug (I don't know whether you noticed it on the tracker and this thread reminded me of it)
Actually, that came from some other factors, include some I tried to point out about the overall push of preferences.
For testing purposes it is very good to not have all low-level components "reach out" and grab the things they think they need to use. It breaks encapsulation and modularity, and makes things harder to both reuse and to test. The latter one is the issue here.
What should have been done in the overall preferences rework was to have interfaces pushed in from high-level components. In this case that would allow a tuned version of the preference store provider to be passed in.
However, in this specific case we do have problems occurring from inside of a nice unit test framework that supports mock objects. Those should be used to hook in to the CxxTest ones. The older test framework that we're migrating away from needs some help, so see what you can figure out about the mock objects. Or a simple test mode for the test programs would be good.