protected override void Context() { _dataFactory = A.Fake <IDataFactory>(); _simModelExporter = A.Fake <ISimModelExporter>(); _simModelSimulationFactory = A.Fake <ISimModelSimulationFactory>(); _simModelSimulation = A.Fake <ISimulation>(); sut = new SimModelBatch(_simModelExporter, _simModelSimulationFactory, _dataFactory); A.CallTo(() => _simModelSimulationFactory.Create()).Returns(_simModelSimulation); _modelCoreSimulation = A.Fake <IModelCoreSimulation>(); _simModelXmlString = "SimModelXml"; A.CallTo(() => _simModelExporter.Export(_modelCoreSimulation, SimModelExportMode.Optimized)).Returns(_simModelXmlString); _parameterProperties1 = A.Fake <IParameterProperties>(); _parameterProperties2 = A.Fake <IParameterProperties>(); _parameterProperties3 = A.Fake <IParameterProperties>(); A.CallTo(() => _parameterProperties1.Path).Returns("ParameterPath1"); A.CallTo(() => _parameterProperties2.Path).Returns("ParameterPath2"); A.CallTo(() => _parameterProperties3.Path).Returns("ParameterPath3"); _allSimModelParameters = new List <IParameterProperties> { _parameterProperties1, _parameterProperties2, _parameterProperties3 }; A.CallTo(() => _simModelSimulation.ParameterProperties).Returns(_allSimModelParameters); _variableParameterPaths = new List <string> { _parameterProperties1.Path, _parameterProperties2.Path }; }
public override void GlobalContext() { base.GlobalContext(); _objectPathFactory = IoC.Resolve <IObjectPathFactory>(); _modelCoreSimulation = IoC.Resolve <SimulationHelperForSpecs>().CreateSimulation(); var simModelExporter = IoC.Resolve <ISimModelExporter>(); var simModelSimulationFactory = A.Fake <ISimModelSimulationFactory>(); A.CallTo(() => simModelSimulationFactory.Create()).Returns(new Simulation()); _simModelManagerForSpecs = new SimModelManagerForSpecs(simModelExporter, simModelSimulationFactory); _simModelSimulation = _simModelManagerForSpecs.CreateSimulation(_modelCoreSimulation); _dataFactory = A.Fake <IDataFactory>(); _variableParameterPaths = new[] { _objectPathFactory.CreateObjectPathFrom(ConstantsForSpecs.Organism, ConstantsForSpecs.BW).PathAsString, _objectPathFactory.CreateObjectPathFrom(ConstantsForSpecs.Organism, ConstantsForSpecs.TableParameter1).PathAsString, }; _variableSpeciesPath = new [] { _objectPathFactory.CreateObjectPathFrom(ConstantsForSpecs.Organism, ConstantsForSpecs.ArterialBlood, ConstantsForSpecs.Plasma, "A").PathAsString, _objectPathFactory.CreateObjectPathFrom(ConstantsForSpecs.Organism, ConstantsForSpecs.VenousBlood, ConstantsForSpecs.Plasma, "B").PathAsString, }; sut = new SimModelBatch(simModelExporter, simModelSimulationFactory, _dataFactory); }