Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-908

Enhance FixtureScript service, support "non-strict" mode


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: core-1.6.0
    • Fix Version/s: core-1.7.0
    • Component/s: Core
    • Labels:


      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();




            • Assignee:
              danhaywood Dan Haywood
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: