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); }
private void removeSimulationFromIdentification(ISimulation simulation, ParameterIdentification identification) { if (!identification.UsesSimulation(simulation)) { return; } removeOutputMappingsForSimulation(simulation, identification); removeLinkedParametersForSimulation(simulation, identification); identification.RemoveSimulation(simulation); }
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); }
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); }
private bool canHandle(RenamedEvent eventToHandle) { return(_parameterIdentification.UsesSimulation(eventToHandle.RenamedObject as ISimulation)); }
public void should_add_the_simulations_to_the_created_parameter_identification() { _result.UsesSimulation(_simulation).ShouldBeTrue(); }
public void should_add_the_simulation_containing_the_parameter() { _parameterIdentification.UsesSimulation(_simulation).ShouldBeTrue(); }
public void should_add_the_simulation_to_the_parameter_identification() { _parameterIdentification.UsesSimulation(_simulation).ShouldBeTrue(); }
private bool identificationUsesSimulation(ISimulation simulation) { return(_parameterIdentification.UsesSimulation(simulation)); }