Ejemplo 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);
 }
Ejemplo n.º 3
0
        private void removeSimulationFromIdentification(ISimulation simulation, ParameterIdentification identification)
        {
            if (!identification.UsesSimulation(simulation))
            {
                return;
            }

            removeOutputMappingsForSimulation(simulation, identification);
            removeLinkedParametersForSimulation(simulation, identification);
            identification.RemoveSimulation(simulation);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo n.º 7
0
 private bool canHandle(RenamedEvent eventToHandle)
 {
     return(_parameterIdentification.UsesSimulation(eventToHandle.RenamedObject as ISimulation));
 }
Ejemplo n.º 8
0
 public void should_add_the_simulations_to_the_created_parameter_identification()
 {
     _result.UsesSimulation(_simulation).ShouldBeTrue();
 }
Ejemplo n.º 9
0
 public void should_add_the_simulation_containing_the_parameter()
 {
     _parameterIdentification.UsesSimulation(_simulation).ShouldBeTrue();
 }
Ejemplo 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));
 }