protected override void Context() { _modelConstructor = A.Fake <IModelConstructor>(); _buildConfigurationFactory = A.Fake <IBuildConfigurationFactory>(); _objectPathFactory = A.Fake <IObjectPathFactory>(); _context = A.Fake <IMoBiContext>(); _applicationController = A.Fake <IMoBiApplicationController>(); _configurePresenter = A.Fake <IConfigureSimulationPresenter>(); _validationVisitor = A.Fake <IDimensionValidator>(); _affectedBuildingBlockRetriever = A.Fake <IAffectedBuildingBlockRetriever>(); _entityPathResolver = new EntityPathResolverForSpecs(); A.CallTo(() => _applicationController.Start <IConfigureSimulationPresenter>()).Returns(_configurePresenter); sut = new SimulationUpdateTask(_modelConstructor, _buildConfigurationFactory, _context, _applicationController, _validationVisitor, _entityPathResolver, _affectedBuildingBlockRetriever); }
protected override void Context() { base.Context(); _pkSimCommand = A.Fake <IPKSimCommand>(); _project = A.Fake <IPKSimProject>(); _configurePresenter = A.Fake <IConfigureSimulationPresenter>(); _simulationToConfigure = new IndividualSimulation().WithId("oldSim"); _newSimulation = new IndividualSimulation().WithId("newSim"); A.CallTo(() => _applicationController.Start <IConfigureSimulationPresenter>()).Returns(_configurePresenter); A.CallTo(() => _configurePresenter.Simulation).Returns(_newSimulation); A.CallTo(() => _configurePresenter.ConfigureSimulation(_simulationToConfigure)).Returns(_pkSimCommand); A.CallTo(() => _executionContext.CurrentProject).Returns(_project); //this is used in the swap command var simulationCommandDescriptionBuilder = A.Fake <ISimulationCommandDescriptionBuilder>(); A.CallTo(() => simulationCommandDescriptionBuilder.BuildDifferenceBetween(_simulationToConfigure, _newSimulation)).Returns(new ReportPart()); A.CallTo(() => _executionContext.Resolve <ISimulationCommandDescriptionBuilder>()).Returns(simulationCommandDescriptionBuilder); }
public void AttachPresenter(IConfigureSimulationPresenter presenter) { WizardPresenter = presenter; }