protected override void Context() { _view = A.Fake <IParameterGroupsView>(); _groupNodeCreator = A.Fake <IParameterGroupNodeCreator>(); _parameterGroupTask = A.Fake <IParameterGroupTask>(); _containerNodeMapper = A.Fake <IParameterContainerToTreeNodeMapper>(); _parameterPresenterMapper = A.Fake <INodeToCustomableParametersPresenterMapper>(); _noItemInSelectionPresenter = A.Fake <INoItemInSelectionPresenter>(); _presenterSettingsTask = A.Fake <IPresentationSettingsTask>(); _treeNodeFactory = A.Fake <ITreeNodeFactory>(); _groupRepository = A.Fake <IGroupRepository>(); _userSettings = A.Fake <IUserSettings>(); _treeNodeContextMenuFactory = A.Fake <ITreeNodeContextMenuFactory>(); _organism = A.Fake <Organism>(); _allParameters = new List <IParameter>(); _parameter = A.Fake <IParameter>(); A.CallTo(() => _parameter.Rules).Returns(new BusinessRuleSet()); _parameterDTO = A.Fake <ParameterDTO>(); A.CallTo(() => _parameterDTO.Parameter).Returns(_parameter); A.CallTo(() => _organism.GetAllChildren(A <Func <IParameter, bool> > .Ignored)).Returns(_allParameters); _containerNode = A.Fake <ITreeNode>(); A.CallTo(() => _containerNodeMapper.MapFrom(_organism)).Returns(_containerNode); A.CallTo(() => _containerNode.Children).Returns(new List <ITreeNode>()); _groupAllNode = A.Fake <ITreeNode <IGroup> >(); _groupFavoritesNode = A.Fake <ITreeNode <IGroup> >(); _groupUserDefinedNode = A.Fake <ITreeNode <IGroup> >(); A.CallTo(() => _treeNodeFactory.CreateGroupAll()).Returns(_groupAllNode); A.CallTo(() => _treeNodeFactory.CreateGroupFavorites()).Returns(_groupFavoritesNode); A.CallTo(() => _treeNodeFactory.CreateGroupUserDefined()).Returns(_groupUserDefinedNode); A.CallTo(() => _noItemInSelectionPresenter.BaseView).Returns(A.Fake <IView>()); }
public IEnumerable <IContainer> AllOrganismContainers(Organism organism) { var allPhysicalContainers = organism.GetAllChildren <IContainer>(x => x.Mode == ContainerMode.Physical).ToList(); removeEndogenousIgGContainers(allPhysicalContainers, organism); return(allPhysicalContainers); }