protected override void Context() { base.Context(); _moleculeBuildingBlock = new MoleculeBuildingBlock(); _createMoleculePresenter = A.Fake <ICreatePKSimMoleculePresenter>(); _molecule = new MoleculeBuilder(); _molecule.DefaultStartFormula = A.Fake <IFormula>(); A.CallTo(() => _createMoleculePresenter.CreateMolecule(_moleculeBuildingBlock)).Returns(_molecule); A.CallTo(() => _interactionTaskContext.ApplicationController.Start <ICreatePKSimMoleculePresenter>()).Returns(_createMoleculePresenter); _defaultStartFormula = new ConstantFormula(); A.CallTo(_formulaTask).WithReturnType <ConstantFormula>().Returns(_defaultStartFormula); A.CallTo(() => _context.AddToHistory(A <ICommand> ._)) .Invokes(x => _command = x.GetArgument <ICommand>(0)); }
public void AttachPresenter(ICreatePKSimMoleculePresenter presenter) { _presenter = presenter; }