protected override void Context() { _view = A.Fake <ISelectEventAssignmentTargetView>(); _context = A.Fake <IMoBiContext>(); _objectBaseDTOMapper = A.Fake <IObjectBaseToObjectBaseDTOMapper>(); _containerDTOMapper = A.Fake <IContainerToContainerDTOMapper>(); _reactionMapper = A.Fake <IReactionBuilderToDummyReactionDTOMapper>(); _moleculeMapper = A.Fake <IMoleculeBuilderToDummyMoleculeDTOMapper>(); _objectPathFactory = A.Fake <IObjectPathFactory>(); _parameterMapper = A.Fake <IParameterToDummyParameterDTOMapper>(); _dimensionRetriever = A.Fake <IReactionDimensionRetriever>(); sut = new SelectEventAssingmentTargetPresenter(_view, _context, _objectBaseDTOMapper, _containerDTOMapper, _reactionMapper, _moleculeMapper, _objectPathFactory, _parameterMapper, _dimensionRetriever); _mobiProject = A.Fake <IMoBiProject>(); _rootContainer = new Container(); _moleculeBuilder = new MoleculeBuilder().WithName("M"); _reaction = new ReactionBuilder().WithName("R"); _localParameter = new Parameter().WithMode(ParameterBuildMode.Local).WithName("LocalParam"); _globalParameter = new Parameter().WithMode(ParameterBuildMode.Global).WithName("GlobalParam"); _reaction.Add(_localParameter); _reaction.Add(_globalParameter); _reactionBB = new MoBiReactionBuildingBlock() { _reaction }; _moleculeBB = new MoleculeBuildingBlock { _moleculeBuilder }; A.CallTo(() => _mobiProject.ReactionBlockCollection).Returns(new [] { _reactionBB }); A.CallTo(() => _mobiProject.MoleculeBlockCollection).Returns(new [] { _moleculeBB }); sut.Init(_mobiProject, _rootContainer); }
public SelectEventAssingmentTargetPresenter(ISelectEventAssignmentTargetView view, IMoBiContext context, IObjectBaseToObjectBaseDTOMapper objectBaseDTOMapper, IContainerToContainerDTOMapper containerDTOMapper, IReactionBuilderToDummyReactionDTOMapper dummyReactionDTOMapper, IMoleculeBuilderToDummyMoleculeDTOMapper dummyMoleculeDTOMapper, IObjectPathFactory objectPathFactory, IParameterToDummyParameterDTOMapper dummyParameterDTOMapper, IReactionDimensionRetriever dimensionRetriever) : base(view) { _context = context; _dimensionRetriever = dimensionRetriever; _objectPathFactory = objectPathFactory; _dummyMoleculeDTOMapper = dummyMoleculeDTOMapper; _dummyReactionDTOMapper = dummyReactionDTOMapper; _containerDTOMapper = containerDTOMapper; _dummyParameterDTOMapper = dummyParameterDTOMapper; _objectBaseDTOMapper = objectBaseDTOMapper; }