Package gov.nasa.arc.mct.defaults.view

Examples of gov.nasa.arc.mct.defaults.view.NodeViewManifestation


        AbstractComponent parent = Mockito.mock(AbstractComponent.class);
        JTree tree = Mockito.mock(JTree.class);
        TreePath treePath = Mockito.mock(TreePath.class);
       
        ActionContextImpl actionContext = Mockito.mock(ActionContextImpl.class);
        NodeViewManifestation selectedNodeView = Mockito.mock(NodeViewManifestation.class);       
        NodeViewManifestation parentNodeView = Mockito.mock(NodeViewManifestation.class);       
        Mockito.when(actionContext.getTargetHousing()).thenReturn(housing);
        Mockito.when(actionContext.getTargetComponent()).thenReturn(ac);
        Mockito.when(housing.getDirectoryArea()).thenReturn(directoryArea);
        Mockito.when(directoryArea.getSelectedManifestations()).thenReturn(Collections.<View>singleton(selectedNodeView));
        Mockito.when(directoryArea.getSelectedDirectoryNode()).thenReturn(selectedNode);
        Mockito.when(selectedNode.getParentTree()).thenReturn(tree);
        Mockito.when(tree.getSelectionPaths()).thenReturn(Arrays.array(treePath));
        Mockito.when(treePath.getLastPathComponent()).thenReturn(selectedNode);
        Mockito.when(selectedNode.getParent()).thenReturn(parentNode);
        Mockito.when(parentNode.getUserObject()).thenReturn(parentNodeView);
        Mockito.when(parentNodeView.getManifestedComponent()).thenReturn(parent);
       
        Assert.assertFalse(action.canHandle(actionContext));
    }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.defaults.view.NodeViewManifestation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.