Ejemplo n.º 1
0
 public DataFactory(IDimensionFactory dimensionFactory, IDataNamingService dataNamingService, IObjectPathFactory objectPathFactory, IDisplayUnitRetriever displayUnitRetriever)
 {
     _dimensionFactory     = dimensionFactory;
     _dataNamingService    = dataNamingService;
     _objectPathFactory    = objectPathFactory;
     _displayUnitRetriever = displayUnitRetriever;
 }
Ejemplo n.º 2
0
 public SimModelManagerFactory(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory, IMoBiContext context, IDataNamingService dataNamingService, IDisplayUnitRetriever displayUnitRetriever)
 {
     _simModelExporter          = simModelExporter;
     _simModelSimulationFactory = simModelSimulationFactory;
     _context              = context;
     _dataNamingService    = dataNamingService;
     _displayUnitRetriever = displayUnitRetriever;
 }
        public override void GlobalContext()
        {
            base.GlobalContext();
            _simModelExporter     = IoC.Resolve <ISimModelExporter>();
            _withIdRepository     = IoC.Resolve <IWithIdRepository>();
            _namingFactory        = A.Fake <IDataNamingService>();
            _dimensionFactory     = IoC.Resolve <IDimensionFactory>();
            _objectPathFactory    = IoC.Resolve <IObjectPathFactory>();
            _displayUnitRetriever = IoC.Resolve <IDisplayUnitRetriever>();

            _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);
            sut = new SimModelManager(_simModelExporter, new SimModelSimulationFactory(), new DataFactory(_dimensionFactory, _namingFactory, _objectPathFactory, _displayUnitRetriever));
        }