- From: Sean Owen <srowen@google.com>
- Date: Sun, 17 Jun 2007 23:55:05 -0400
- To: public-mobileok-checker <public-mobileok-checker@w3.org>
So I added "TesterConfiguration", which is kind of a strange class. The requirement here was to implement some kind of configuration object which merely holds different parameters. That part is easy -- just a fancy Map -- but the other requirement was to figure out a way to avoid passing it to every single class and method. I implemented this as a per-thread singleton, which will work but is not really pleasant for my tastes. One sets configuration with TesterConfiguration.setConfiguration() before running tests, and retrieves configuration in any line of code with TesterConfiguration.getConfiguration(). The singleton is per-thread, meaning this will store and hold a separate value per thread (see java.lang.ThreadLocal). So this mostly assumes that exactly one thread will manage each test. It's convenient, if a little hacky, so let's see how well it serves us. Sean
Received on Monday, 18 June 2007 03:55:18 UTC