protected override Task Context() { _parameterIdentificationConfigurationMapper = A.Fake <ParameterIdentificationConfigurationMapper>(); _outputMappingMapper = A.Fake <OutputMappingMapper>(); _identificationParameterMapper = A.Fake <IdentificationParameterMapper>(); _parameterIdentificationAnalysisMapper = A.Fake <ParameterIdentificationAnalysisMapper>(); _objectBaseFactory = A.Fake <IObjectBaseFactory>(); _logger = A.Fake <IOSPSuiteLogger>(); _project = new PKSimProject(); _snapshotContext = new SnapshotContext(_project, ProjectVersions.Current); _simulation = new IndividualSimulation().WithName("S1"); _project.AddBuildingBlock(_simulation); _parameterIdentification = new ModelParameterIdentification(); _snapshotParameterIndentificationConfiguration = new ParameterIdentificationConfiguration(); _snapshotOutputMapping = new Snapshots.OutputMapping(); _outputMapping = new OutputMapping(); _parameterIdentification.AddSimulation(_simulation); _parameterIdentification.AddOutputMapping(_outputMapping); _identificationParameter = new IdentificationParameter { Name = "IP" }; _parameterIdentification.AddIdentificationParameter(_identificationParameter); _snapshotIdentificationParameter = new Snapshots.IdentificationParameter(); _snapshotParameterIdentificationAnalysis = new ParameterIdentificationAnalysis(); _parameterIdentificationAnalysis = A.Fake <ISimulationAnalysis>(); _parameterIdentification.AddAnalysis(_parameterIdentificationAnalysis); sut = new ParameterIdentificationMapper( _parameterIdentificationConfigurationMapper, _outputMappingMapper, _identificationParameterMapper, _parameterIdentificationAnalysisMapper, _objectBaseFactory, _logger ); A.CallTo(() => _parameterIdentificationConfigurationMapper.MapToSnapshot(_parameterIdentification.Configuration)).Returns(_snapshotParameterIndentificationConfiguration); A.CallTo(() => _outputMappingMapper.MapToSnapshot(_outputMapping)).Returns(_snapshotOutputMapping); A.CallTo(() => _identificationParameterMapper.MapToSnapshot(_identificationParameter)).Returns(_snapshotIdentificationParameter); A.CallTo(() => _parameterIdentificationAnalysisMapper.MapToSnapshot(_parameterIdentificationAnalysis)).Returns(_snapshotParameterIdentificationAnalysis); return(_completed); }
protected override Task Context() { _parameterIdentificationAnalysisChartMapper = A.Fake <ParameterIdentificationAnalysisChartMapper>(); _dataRepositoryMapper = A.Fake <DataRepositoryMapper>(); _idGenerator = A.Fake <IIdGenerator>(); sut = new ParameterIdentificationAnalysisMapper(_parameterIdentificationAnalysisChartMapper, _dataRepositoryMapper, _idGenerator); _parameterIdentificationAnalysis = new T().WithName("Chart"); _chartSnapshot = new CurveChart(); _localRepository = DomainHelperForSpecs.ObservedData(); _snapshotLocalRepository = new Snapshots.DataRepository(); A.CallTo(() => _dataRepositoryMapper.MapToSnapshot(_localRepository)).Returns(_snapshotLocalRepository); _parameterIdentification = new ParameterIdentification(); _project = new PKSimProject(); _parameterIdentificationContext = new ParameterIdentificationContext(_parameterIdentification, _project); return(_completed); }