public void Setup() { _connectionInitiator = Substitute.For <IConnectionInitiator>(); _previousSessionOpener = new PreviousSessionOpener(_connectionInitiator); _connectionTree = Substitute.For <IConnectionTree>(); _connectionTree.GetRootConnectionNode().Returns(BuildTree()); }
public void Execute(IConnectionTree connectionTree) { var rootNode = connectionTree.GetRootConnectionNode(); var containerList = connectionTree.ConnectionTreeModel.GetRecursiveChildList(rootNode).OfType <ContainerInfo>(); var previouslyExpandedNodes = containerList.Where(container => container.IsExpanded); connectionTree.ExpandedObjects = previouslyExpandedNodes; connectionTree.InvokeRebuildAll(true); }
public ExpandNodeClickHandler(IConnectionTree connectionTree) { if (connectionTree == null) { throw new ArgumentNullException(nameof(connectionTree)); } _connectionTree = connectionTree; }
public void Execute(IConnectionTree connectionTree) { var connectionInfoList = connectionTree.GetRootConnectionNode().GetRecursiveChildList().Where(node => !(node is ContainerInfo)); var previouslyOpenedConnections = connectionInfoList.Where(item => item.PleaseConnect); foreach (var connectionInfo in previouslyOpenedConnections) { _connectionInitiator.OpenConnection(connectionInfo); } }
public void Execute(IConnectionTree connectionTree) { var connectionInfoList = connectionTree.GetRootConnectionNode().GetRecursiveChildList().Where(node => !(node is ContainerInfo)); var previouslyOpenedConnections = connectionInfoList .Where(item => item.PleaseConnect && // ignore items that have already connected !_connectionInitiator.ActiveConnections.Contains(item.ConstantID)); foreach (var connectionInfo in previouslyOpenedConnections) { _connectionInitiator.OpenConnection(connectionInfo); } }
public void Setup() { _connectionTree = Substitute.For <IConnectionTree>(); _clickHandler = new ExpandNodeClickHandler(_connectionTree); }
public void Setup() { _connectionTree = Substitute.For <IConnectionTree>(); _connectionTree.SelectedNode.Returns(new ConnectionInfo()); }
public void Setup() { _folderExpander = new PreviouslyOpenedFolderExpander(); _connectionTree = Substitute.For <IConnectionTree>(); }
public SelectedConnectionDeletionConfirmer(IConnectionTree connectionTree, Func <string, string, MessageBoxButtons, MessageBoxIcon, DialogResult> confirmationFunc) { _connectionTree = connectionTree; _confirmationFunc = confirmationFunc; }
public void Execute(IConnectionTree connectionTree) { var rootConnectionNode = connectionTree.GetRootConnectionNode(); connectionTree.InvokeExpand(rootConnectionNode); }