This document contains a simple preliminary description of testcases on BookmarkEntry interface of Webclient API.

1. Tests on getProperties() method.

Test IDActionExpected Result
basic/api/BookmarkEntry_getProperties:0Method gets properties from bookmarkEntry which is recieved via TreeModelMethod returns correct properties
basic/api/BookmarkEntry_getProperties:1Method gets properties from bookmarkEntry which is recieved via newBookmarkEntryMethod returns correct properties
basic/api/BookmarkEntry_getProperties:2Method gets properties from bookmarkEntry which is recieved via newBookmarkFolderMethod returns correct properties

2. Tests on isFolder() method.

Test IDActionExpected Result
basic/api/BookmarkEntry_isFolder:0Method checks bookmarkEntry recieved via newBookmarkEntryMethod returns false
basic/api/BookmarkEntry_isFolder:1Method checks bookmarkEntry recieved via newBookmarkFolderMethod returns true

3. Tests on insert(MutableTreeNode child, int index) method.

Test IDActionExpected Result
basic/api/BookmarkEntry_insert:0Method adds NULL child to the receiverBrowser doesn't crashed
basic/api/BookmarkEntry_insert:1Method adds correct child to the receiver at indexChild is added
basic/api/BookmarkEntry_insert:2Method adds correct child to the receiver at index=0Browser doesn't crashed
basic/api/BookmarkEntry_insert:3Method adds correct child to the receiver at index=-2147483648Browser doesn't crashed
basic/api/BookmarkEntry_insert:4Method adds correct child to the receiver at index=2147483647Browser doesn't crashed

4. Tests on remove(int index) method.

Test IDActionExpected Result
basic/api/BookmarkEntry_remove_1:0Method removes the child at existed index from the receiver.Child is removed
basic/api/BookmarkEntry_remove_1:1Method removes the child at index=0 from the receiver.Browser doesn't crashed
basic/api/BookmarkEntry_remove_1:2Method removes the child at index=-2147483648 from the receiver.Browser doesn't crashed
basic/api/BookmarkEntry_remove_1:3Method removes the child at index=2147483647 from the receiver.Browser doesn't crashed

5. Tests on remove(MutableTreeNode node) method.

Test IDActionExpected Result
basic/api/BookmarkEntry_remove_2:0Method removes the NULL node from the receiver.Browser doesn't crashed
basic/api/BookmarkEntry_remove_2:1Method removes the existed node from the receiver.Child is removed

6. Tests on removeFromParent() method.

Test IDActionExpected Result
basic/api/BookmarkEntry_removeFromParent:0Method removes the receiver from its parent=NULL.Browser doesn't crashed
basic/api/BookmarkEntry_removeFromParent:1Method Removes the receiver from its correct parent.Reciever is removed

7. Tests on setParent(MutableTreeNode newParent) method.

Test IDActionExpected Result
basic/api/BookmarkEntry_setParent:0Method sets the parent of the receiver to newParent=NULL.Browser doesn't crashed
basic/api/BookmarkEntry_setParent:1Method sets the parent of the receiver to correct newParent.newParent is set

8. Tests on setUserObject(Object object) method.

Test IDActionExpected Result
basic/api/BookmarkEntry_setUserObject:0Method resets the user object of the receiver to object=NULL.Browser doesn't crashed
basic/api/BookmarkEntry_setUserObject:1Method resets the user object of the receiver to correct object.The user object is reseted

9. Tests on children() method.

Test IDActionExpected Result
basic/api/BookmarkEntry_children:0Method returns the children of the bookmarkFolder as an Enumeration.Correct Enumeration object is returned.
basic/api/BookmarkEntry_children:1Method returns the children of the bookmarkEntry as an Enumeration.Browser doesn't crashed

10. Tests on getAllowsChildren() method.

Test IDActionExpected Result
basic/api/BookmarkEntry_getAllowsChildren:0Method returns boolean result for the reciever=bookmarkFolder.Result is true.
basic/api/BookmarkEntry_getAllowsChildren:1Method returns boolean result for the reciever=bookmarkEntry.Result is false.

11. Tests on getChildAt(int index) method.

Test IDActionExpected Result
basic/api/BookmarkEntry_getChildAt:0Method tries to return the child of the bookmarkEntry.Browser doesn't crashed
basic/api/BookmarkEntry_getChildAt:1Method returns the child at correct index.Child is returned.
basic/api/BookmarkEntry_getChildAt:2Method tries to return the child at index=0.Browser doesn't crashed
basic/api/BookmarkEntry_getChildAt:3Method tries to return the child at index=-2147483648.Browser doesn't crashed
basic/api/BookmarkEntry_getChildAt:4Method tries to return the child at index=2147483647.Browser doesn't crashed

12. Tests on getChildCount() method.

Test IDActionExpected Result
basic/api/BookmarkEntry_getChildCount:0Method returns the number of children the bookmarkFolder contains.Correct number is returned.
basic/api/BookmarkEntry_getChildCount:1Method returns the number of children the bookmarkEntry contains.Browser doesn't crashed

13. Tests on getIndex(TreeNode node) method.

Test IDActionExpected Result
basic/api/BookmarkEntry_getIndex:0Method returns the index of node in the bookmarkFolder children.Correct number is returned.
basic/api/BookmarkEntry_getIndex:1Method returns the index of node in the bookmarkEntry children.Browser doesn't crashed
basic/api/BookmarkEntry_getIndex:2Method returns the index of node=NULL in the bookmarkFolder children.Browser doesn't crashed
basic/api/BookmarkEntry_getIndex:3Method returns the index of node=bookmarkFolder in the bookmarkFolder children.Browser doesn't crashed
basic/api/BookmarkEntry_getIndex:4Method returns the index of incorrect node in the bookmarkFolder children.Browser doesn't crashed

14. Tests on getParent() method.

Test IDActionExpected Result
basic/api/BookmarkEntry_getParent:0Method returns the parent node of the reciever=bookmarkFolder, which has no parent.Browser doesn't crashed
basic/api/BookmarkEntry_getParent:1Method returns the parent node of the reciever=bookmarkFolder, which has a parent.Correct parent is returned.
basic/api/BookmarkEntry_getParent:2Method returns the parent node of the reciever=bookmarkEntry, which has no parent.Browser doesn't crashed
basic/api/BookmarkEntry_getParent:3Method returns the parent node of the reciever=bookmarkEntry, which has a parent.Correct parent is returned.

15. Tests on isLeaf() method.

Test IDActionExpected Result
basic/api/BookmarkEntry_isLeaf:0Method returns true if reciever=bookmarkFolder is a leaf.True is returned.
basic/api/BookmarkEntry_isLeaf:1Method returns true if reciever=bookmarkEntry is a leaf.False is returned.