Esempio n. 1
0
 protected override void Context()
 {
     base.Context();
     _simulation = A.Fake <ISimulation>();
     _parameterIdentification = A.Fake <ParameterIdentification>();
     A.CallTo(() => _parameterIdentification.UsesSimulation(_simulation)).Returns(true);
 }
 protected override void Context()
 {
     base.Context();
     _parameterIdentification = A.Fake <ParameterIdentification>();
     _project.AddParameterIdentification(_parameterIdentification);
     _parameterIdentification.IsLoaded = true;
     A.CallTo(() => _parameterIdentification.UsesSimulation(_oldSimulation)).Returns(true);
 }
Esempio n. 3
0
        private void removeSimulationFromIdentification(ISimulation simulation, ParameterIdentification identification)
        {
            if (!identification.UsesSimulation(simulation))
            {
                return;
            }

            removeOutputMappingsForSimulation(simulation, identification);
            removeLinkedParametersForSimulation(simulation, identification);
            identification.RemoveSimulation(simulation);
        }
Esempio n. 4
0
        public void AddSimulation(ISimulation simulation)
        {
            if (_parameterIdentification.UsesSimulation(simulation))
            {
                return;
            }

            _parameterIdentificationTask.AddSimulationTo(_parameterIdentification, simulation);
            addSimulationToView(simulation);
            SimulationAdded(this, new SimulationEventArgs(simulation));
        }
        public void AddSimulationTo(ParameterIdentification parameterIdentification, ISimulation simulation)
        {
            if (parameterIdentification.UsesSimulation(simulation))
            {
                return;
            }

            _executionContext.Load(simulation);

            parameterIdentification.AddSimulation(simulation);
            addOutputMappingsFor(simulation, parameterIdentification);
        }
Esempio n. 6
0
        private void updatePaths(ParameterIdentification identification, ISimulation simulation, string oldName, string newName)
        {
            if (!identification.UsesSimulation(simulation))
            {
                return;
            }

            _executionContext.Load(identification);

            updateMappedObservationColumnPaths(identification, simulation, oldName, newName);
            updateSimulationResultColumnPaths(identification, oldName, newName);
            updateResidualOutputsPaths(identification, oldName, newName);
        }
Esempio n. 7
0
 private bool canHandle(RenamedEvent eventToHandle)
 {
     return(_parameterIdentification.UsesSimulation(eventToHandle.RenamedObject as ISimulation));
 }
Esempio n. 8
0
 public void should_add_the_simulations_to_the_created_parameter_identification()
 {
     _result.UsesSimulation(_simulation).ShouldBeTrue();
 }
Esempio n. 9
0
 public void should_add_the_simulation_containing_the_parameter()
 {
     _parameterIdentification.UsesSimulation(_simulation).ShouldBeTrue();
 }
Esempio n. 10
0
 public void should_add_the_simulation_to_the_parameter_identification()
 {
     _parameterIdentification.UsesSimulation(_simulation).ShouldBeTrue();
 }
 private bool identificationUsesSimulation(ISimulation simulation)
 {
     return(_parameterIdentification.UsesSimulation(simulation));
 }