Test Data Buildering: Take 2

After the great comments on the last post about the test data builders we kept poking and prodding to see what we could do. What we came up with looks like this now:


FundOfFund fohf = derivedFromA(new FundOfFundTemplate() {{
    with(name, "Blah");
}});

The structure isn’t really different, but the naming has changed. Instead of being called “builders” or “makers” we call them “templates”. This was prompted by Antony Marcano’s comment about things being tailor made. At first we tried calling them “patterns” but realized that this would cause far too much confusion during discussions because of the whole design pattern domain. Name clashes can make a great idea very quickly turn bad.

We tried to keep on the tailoring idea for a bit, but decided to drop it in favor of deriving things from templates (with the path there being something like: pattern -> template pattern -> template -> create things based on a template).