protected override void Context()
 {
     m_TreeViewPresenter = new TreeViewPresenter(MockTreeView);
     Testing.MockCategoryService.Setup(x => x.GetAll())
         .Returns(new List<Category> {
             new Category { Id = 1 },
             new Category { Id = 2 },
             new Category { Id = 3 }});
 }
Exemple #2
0
        public void CreatePresenter()
        {
            _view.Tree.ContextMenuStrip.Returns(new ContextMenuStrip());
            _settings.Gui.TestTree.SaveVisualState = false;

            _presenter = new TreeViewPresenter(_view, _model);

            // Make it look like the view loaded
            _view.Load += Raise.Event <System.EventHandler>(_view, new System.EventArgs());

            // We can't construct a TreeNodeCollection, so we fake it
            var nodes = new TreeNode().Nodes;

            nodes.Add(new TreeNode("test.dll"));
            _view.Tree.Nodes.Returns(nodes);
        }
 protected override void Context()
 {
     m_TreeViewPresenter = new TreeViewPresenter(MockTreeView);
     Testing.MockCategoryService.Setup(x => x.GetAll())
         .Returns(new List<Category> {
             new Category { Id = 1 },
             new Category { Id = 2 },
             new Category { Id = 3 }});
     m_TreeViewPresenter.FillTreeView();
     MockTreeView.OverviewTreeView.Nodes[0].ChildNodes[0].Selected = true;
     m_ActiveMenu = m_TreeViewPresenter.GetSelectedNodeDepth();
 }
 protected override void Context()
 {
     m_TreeViewPresenter = new TreeViewPresenter(MockTreeView);
 }
Exemple #5
0
 public void RemovePresenter()
 {
     _presenter = null;
 }