Ejemplo n.º 1
0
        public void Handle(SimulationAnalysisCreatedEvent eventToHandle)
        {
            if (!Equals(eventToHandle.Analysable, Analyzable))
            {
                return;
            }

            //new plot created=>load from template
            createAnalysis(eventToHandle.SimulationAnalysis);
        }
 protected override void Context()
 {
     base.Context();
     _simulation = new IndividualSimulation();
     _chart      = new SimulationTimeProfileChart();
     A.CallTo(() => _chartFactory.CreateChartFor(_simulation)).Returns(_chart);
     _chart1 = new SimulationTimeProfileChart {
         Name = "Results 1"
     };
     _chart2 = new SimulationTimeProfileChart {
         Name = "My Results"
     };
     _simulation.AddAnalysis(_chart1);
     _simulation.AddAnalysis(_chart2);
     A.CallTo(_containerTask).WithReturnType <string>().Returns("Results 3");
     A.CallTo(() => _executionContext.PublishEvent(A <SimulationAnalysisCreatedEvent> .Ignored)).Invokes(
         x => _plotEvent = x.GetArgument <SimulationAnalysisCreatedEvent>(0));
 }