[
https://issues.apache.org/jira/browse/ISIS-908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Haywood resolved ISIS-908.
------------------------------
Resolution: Fixed
> Enhance FixtureScript service, support "non-strict" mode
> --------------------------------------------------------
>
> Key: ISIS-908
> URL: https://issues.apache.org/jira/browse/ISIS-908
> Project: Isis
> Issue Type: Improvement
> Components: Core
> Affects Versions: core-1.6.0
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Fix For: core-1.7.0
>
>
> Currently the design of the fixture script service is that a given fixture
> script can only run once (by class/type). This supports the approach where a
> leaf fixture script encodes both the "how to" (which business operations to
> perform) and also the "what" (what the fixture data actually is). This
> distinction is seen in Estatio as the difference between the "abstract"
> superclasses (eg LeaseAbstract) and the concrete subclasses (eg
> LeaseForOxfPret004, LeaseForKalPoison001).
> But another way to use fixture scripts is to keep the "what" in the calling
> fixture, and just have the leaf fixture scripts be parameterizable. eg in
> effect LeaseAbstract becomes concrete (rename to LeaseSetUp) and can be
> called multiple times.
> Thus, make the fixture script configurable to either strictly enforce the
> rule that a given fixture class can only be run once (Estatio's design) or,
> um, simply not enforce that (the other design).
> ~~~~
> In addition...
> in FixtureResultList (or equiv), an overloaded way to lookup fixtures by key:
> public static Object Lookup(this IList<IFixtureResult>
> fixtureResults, string key)
> {
> var keys = key.Split('/');
> return Lookup(fixtureResults, keys);
> }
> and in FixtureScriptExecutionContext:
> internal void TraceResult(IFixtureScript fixtureScript, string key,
> FixtureResult fixtureResult)
> {
> if (_traceWriter == null)
> {
> return;
> }
> var qualifiedName =
> FixtureScriptService.QualifiedNameFor(fixtureScript);
> var paddedQualifiedName = Pad(qualifiedName,
> MaxQualifiedNameLength);
> var trace = paddedQualifiedName + "/" + key + ": " +
> fixtureResult.ToString();
> _traceWriter.WriteLine(trace);
> _traceWriter.Flush();
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)