protected override void Context() { base.Context(); _populationSimulation = A.Fake <PopulationSimulation>(); _workflow = new SimulationAnalysisWorkflow(); A.CallTo(() => _simulationAnalysisWorkflowMapper.MapFrom(_populationSimulation)).Returns(_workflow); }
protected override void Context() { base.Context(); _workflow = new SimulationAnalysisWorkflow { OutputSelections = new OutputSelections() }; _analysis1 = A.Fake <ISimulationAnalysis>(); _analysis2 = A.Fake <ISimulationAnalysis>(); _workflow.Add(_analysis1); _workflow.Add(_analysis2); _populationSimulation = A.Fake <PopulationSimulation>(); A.CallTo(() => _templateTask.LoadFromTemplate <SimulationAnalysisWorkflow>(TemplateType.PopulationSimulationAnalysisWorkflow)).Returns(_workflow); }
public SimulationAnalysisWorkflow MapFrom(IAnalysable populationDataCollector) { var populationAnalysisWorkflow = new SimulationAnalysisWorkflow(); populationDataCollector.Analyses.Each(populationAnalysisWorkflow.Add); var populationSimulation = populationDataCollector as PopulationSimulation; if (populationSimulation != null) { populationAnalysisWorkflow.OutputSelections = populationSimulation.OutputSelections; } return(populationAnalysisWorkflow); }
protected override void Because() { _result = sut.MapFrom(_populationSimulation); }