示例#1
0
 public JsonSimulationRunner(ISimulationLoader simulationLoader, ISimulationExporter simulationExporter, IBatchLogger logger,
                             IEntitiesInContainerRetriever entitiesInContainerRetriever, IExecutionContext executionContext, ICommandTask commandTask)
 {
     _simulationLoader             = simulationLoader;
     _simulationExporter           = simulationExporter;
     _logger                       = logger;
     _entitiesInContainerRetriever = entitiesInContainerRetriever;
     _executionContext             = executionContext;
     _commandTask                  = commandTask;
 }
示例#2
0
 public ExportSimulationRunner(
     ILogger logger,
     IWorkspacePersistor workspacePersistor,
     ICoreWorkspace workspace,
     ISimulationExporter simulationExporter,
     ILazyLoadTask lazyLoadTask
     )
 {
     _logger             = logger;
     _workspacePersistor = workspacePersistor;
     _workspace          = workspace;
     _simulationExporter = simulationExporter;
     _lazyLoadTask       = lazyLoadTask;
 }
示例#3
0
 public JsonSimulationRunner(
     ISimulationExporter simulationExporter,
     IOSPSuiteLogger logger,
     ISnapshotTask snapshotTask
     )
 {
     _simulationExporter   = simulationExporter;
     _logger               = logger;
     _snapshotTask         = snapshotTask;
     _simulationRunOptions = new SimulationRunOptions
     {
         Validate = false,
         CheckForNegativeValues = false,
     };
 }
示例#4
0
 public JsonSimulationRunner(
     ISimulationExporter simulationExporter,
     ILogger logger,
     ISnapshotTask snapshotTask
     )
 {
     _simulationExporter   = simulationExporter;
     _logger               = logger;
     _snapshotTask         = snapshotTask;
     _simulationRunOptions = new SimulationRunOptions
     {
         Validate = false,
         CheckForNegativeValues = false,
         RunForAllOutputs       = true
     };
 }
        protected override Task Context()
        {
            _logger             = A.Fake <ILogger>();
            _workspacePersitor  = A.Fake <IWorkspacePersistor>();
            _workspace          = A.Fake <IWorkspace>();
            _simulationExporter = A.Fake <ISimulationExporter>();
            _lazyLoadTask       = A.Fake <ILazyLoadTask>();
            sut = new ExportSimulationRunner(_logger, _workspacePersitor, _workspace, _simulationExporter, _lazyLoadTask);

            _project     = new PKSimProject();
            _simulation1 = createSimulationWithResults(_simulation1Name);
            _simulation2 = createSimulationWithResults(_simulation2Name);

            A.CallTo(() => _workspacePersitor.LoadSession(_workspace, _projectFileName)).Invokes(x => { _workspace.Project = _project; });


            return(_completed);
        }