protected override void Context()
 {
     base.Context();
     _batchSimulationExport = new BatchSimulationExport {
         Name = "Sim"
     };
     A.CallTo(() => _batchSimulationExportMapper.MapFrom(_simulation, _results)).Returns(_batchSimulationExport);
 }
        public BatchSimulationExport MapFrom(IModelCoreSimulation simulation, DataRepository results)
        {
            var simulationExport = new BatchSimulationExport
            {
                Name            = simulation.Name,
                Times           = displayValuesFor(results.BaseGrid),
                ParameterValues = parameterValuesFor(simulation.Model),
                AbsTol          = simulation.SimulationSettings.Solver.AbsTol,
                RelTol          = simulation.SimulationSettings.Solver.RelTol,
            };

            results.AllButBaseGrid().Each(c => simulationExport.OutputValues.Add(quantityResultsFrom(c)));

            return(simulationExport);
        }
Example #3
0
 protected override void Because()
 {
     _simulationExport = sut.MapFrom(_simulation, _dataRepository);
 }