public override void GlobalContext() { base.GlobalContext(); _simModelExporter = IoC.Resolve <ISimModelExporter>(); _withIdRepository = IoC.Resolve <IWithIdRepository>(); _objectPathFactory = IoC.Resolve <IObjectPathFactory>(); _entityInSimulationRetriever = IoC.Resolve <IEntitiesInSimulationRetriever>(); _simulation = IoC.Resolve <SimulationHelperForSpecs>().CreateSimulation(); new RegisterTaskForSpecs(_withIdRepository).RegisterAllIn(_simulation.Model.Root); _populationData = createPopTableParameters(); _agingData = createPopAgingParameters(); _initialValuesData = createPopInitialValues(); _runOptions = new RunOptions(); sut = new PopulationRunner(_simModelExporter, new SimModelSimulationFactory(), _objectPathFactory, _entityInSimulationRetriever); _results = sut.RunPopulationAsync(_simulation, _runOptions, _populationData, _agingData).Result; }
public override void GlobalContext() { base.GlobalContext(); _simModelExporter = IoC.Resolve <ISimModelExporter>(); _withIdRepository = IoC.Resolve <IWithIdRepository>(); _objectPathFactory = IoC.Resolve <IObjectPathFactory>(); _simulation = IoC.Resolve <SimulationHelperForSpecs>().CreateSimulation(); new RegisterTaskForSpecs(_withIdRepository).RegisterAllIn(_simulation.Model.Root); var schemaPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "OSPSuite.SimModel.xsd"); XMLSchemaCache.InitializeFromFile(schemaPath); _populationData = createPopTableParameters(); _agingData = createPopAgingParameters(); _initialValuesData = createPopInitialValues(); sut = new PopulationRunner(_simModelExporter, new SimModelSimulationFactory(), _objectPathFactory); _results = sut.RunPopulationAsync(_simulation, _populationData, _agingData).Result; }