Пример #1
0
        public bool RunTest(out IReplayInformations infos)
        {
            infos = null;
            AssertException exception = null;

            Action invariantsEncapsulated = delegate {
                try {
                    invariantsMethod ();
                } catch (TargetInvocationException e) {
                    Scheduler.Stop ();
                    exception = e.InnerException as AssertException;
                }
            };

            foreach (Action action in testMethods)
                Scheduler.EnqueueWork (new HeisenThread (action));

            Scheduler.Run (initMethod, invariantsEncapsulated);
            Console.WriteLine ("Test concluded after {0} mixed-interleaving runs", Scheduler.NumberOfRun.ToString ());

            if (exception != null)
                infos = new ReplayInfos (exception);

            return exception == null;
        }
Пример #2
0
 public bool ReplayScenario(IReplayInformations infos)
 {
     return true;
 }