@Test public void testNewFileNode() throws Exception { TreeNode parent = mock(TreeNode.class); ItemReference data = mock(ItemReference.class); when(data.getType()).thenReturn("file"); treeStructure.newFileNode(parent, data); verify(nodeFactory).newFileNode(eq(parent), eq(data), eq(treeStructure)); }
public FileNode newFileNode(@Nonnull TreeNode parent, @Nonnull ItemReference data) { if (!"file".equals(data.getType())) { throw new IllegalArgumentException("The associated ItemReference type must be - file."); } return getNodeFactory().newFileNode(parent, data, this); }
GenericTreeStructure implements TreeStructure { public FileNode newFileNode(@Nonnull TreeNode parent, @Nonnull ItemReference data) { if (!"file".equals(data.getType())) { throw new IllegalArgumentException("The associated ItemReference type must be - file."); } return getNodeFactory().newFileNode(parent, data, this); } }
GenericTreeStructure implements TreeStructure { public FileNode newFileNode(@Nonnull TreeNode parent, @Nonnull ItemReference data) { if (!"file".equals(data.getType())) { throw new IllegalArgumentException("The associated ItemReference type must be - file."); } return getNodeFactory().newFileNode(parent, data, this); } protected  GenericTreeStructure(NodeFactory nodeFactory, EventBus eventBus, AppContext appContext,
                                   ProjectServiceClient projectServiceClient, DtoUnmarshallerFactory dtoUnmarshallerFactory); }
GenericTreeStructure implements TreeStructure { public FileNode newFileNode(@Nonnull TreeNode parent, @Nonnull ItemReference data) { if (!"file".equals(data.getType())) { throw new IllegalArgumentException("The associated ItemReference type must be - file."); } return getNodeFactory().newFileNode(parent, data, this); } protected  GenericTreeStructure(NodeFactory nodeFactory, EventBus eventBus, AppContext appContext,
                                   ProjectServiceClient projectServiceClient, DtoUnmarshallerFactory dtoUnmarshallerFactory); @Override void getRootNodes(@Nonnull AsyncCallback<Array<TreeNode<?>>> callback); @Nonnull @Override TreeSettings getSettings(); NodeFactory getNodeFactory(); @Override void getNodeByPath(@Nonnull final String path, @Nonnull final AsyncCallback<TreeNode<?>> callback); ProjectNode newProjectNode(@Nonnull ProjectDescriptor data); FileNode newFileNode(@Nonnull TreeNode parent, @Nonnull ItemReference data); FolderNode newFolderNode(@Nonnull TreeNode parent, @Nonnull ItemReference data); }
GenericTreeStructure implements TreeStructure { public FileNode newFileNode(@Nonnull TreeNode parent, @Nonnull ItemReference data) { if (!"file".equals(data.getType())) { throw new IllegalArgumentException("The associated ItemReference type must be - file."); } return getNodeFactory().newFileNode(parent, data, this); } protected  GenericTreeStructure(NodeFactory nodeFactory, EventBus eventBus, AppContext appContext,
                                   ProjectServiceClient projectServiceClient, DtoUnmarshallerFactory dtoUnmarshallerFactory); @Override void getRootNodes(@Nonnull AsyncCallback<Array<TreeNode<?>>> callback); @Nonnull @Override TreeSettings getSettings(); NodeFactory getNodeFactory(); @Override void getNodeByPath(@Nonnull final String path, @Nonnull final AsyncCallback<TreeNode<?>> callback); ProjectNode newProjectNode(@Nonnull ProjectDescriptor data); FileNode newFileNode(@Nonnull TreeNode parent, @Nonnull ItemReference data); FolderNode newFolderNode(@Nonnull TreeNode parent, @Nonnull ItemReference data);  }