167 lines
11 KiB
HTML
167 lines
11 KiB
HTML
<html>
|
|
<head>
|
|
<title>
|
|
Description of tests on BookmarkEntry interface
|
|
</title>
|
|
</head>
|
|
<body bgcolor=white>
|
|
<P align=left>This document contains a simple preliminary description of
|
|
testcases on BookmarkEntry interface of Webclient API.</P>
|
|
|
|
<UL>
|
|
<LI><A href=#getProp>Tests on <B>getProperties()</B> method</A>
|
|
<LI><A href=#isFolder>Tests on <B>isFolder()</B> method</A>
|
|
<LI><A href=#insert>Tests on <B>insert(MutableTreeNode, int)</B> method (inherited from javax.swing.tree.MutableTreeNode)</A>
|
|
<LI><A href=#remove1>Tests on <B>remove(int)</B> method (inherited from javax.swing.tree.MutableTreeNode)</A>
|
|
<LI><A href=#remove2>Tests on <B>remove(MutableTreeNode)</B> method (inherited from javax.swing.tree.MutableTreeNode)</A>
|
|
<LI><A href=#remove3>Tests on <B>removeFromParent()</B> method (inherited from javax.swing.tree.MutableTreeNode)</A>
|
|
<LI><A href=#setParent>Tests on <B>setParent(MutableTreeNode)</B> method (inherited from javax.swing.tree.MutableTreeNode)</A>
|
|
<LI><A href=#setUO>Tests on <B>setUserObject</B> method (inherited from javax.swing.tree.MutableTreeNode)</A>
|
|
<LI><A href=#children>Tests on <B>children()</B> method (inherited from javax.swing.tree.TreeNode)</A>
|
|
<LI><A href=#getAllowsChildren>Tests on <B>getAllowsChildren()</B> method (inherited from javax.swing.tree.TreeNode)</A>
|
|
<LI><A href=#getChildAt>Tests on <B>getChildAt(int)</B> method (inherited from javax.swing.tree.TreeNode)</A>
|
|
<LI><A href=#getChildCount>Tests on <B>getChildCount()</B> method (inherited from javax.swing.tree.TreeNode)</A>
|
|
<LI><A href=#getIndex>Tests on <B>getIndex(TreeNode)</B> method (inherited from javax.swing.tree.TreeNode)</A>
|
|
<LI><A href=#getParent>Tests on <B>getParent()</B> method (inherited from javax.swing.tree.TreeNode)</A>
|
|
<LI><A href=#isLeaf>Tests on <B>isLeaf()</B> method (inherited from javax.swing.tree.TreeNode)</A>
|
|
</UL>
|
|
|
|
<A name=getProp>
|
|
<H2>1. Tests on getProperties() method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_getProperties:0</td><td>Method gets properties from bookmarkEntry which is recieved via TreeModel</td><td>Method returns correct properties</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getProperties:1</td><td>Method gets properties from bookmarkEntry which is recieved via newBookmarkEntry</td><td>Method returns correct properties</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getProperties:2</td><td>Method gets properties from bookmarkEntry which is recieved via newBookmarkFolder</td><td>Method returns correct properties</td></tr>
|
|
</table>
|
|
|
|
|
|
<A name=isFolder>
|
|
<H2>2. Tests on isFolder() method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_isFolder:0</td><td>Method checks bookmarkEntry recieved via newBookmarkEntry</td><td>Method returns false</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_isFolder:1</td><td>Method checks bookmarkEntry recieved via newBookmarkFolder</td><td>Method returns true</td></tr>
|
|
</table>
|
|
|
|
<A name=insert>
|
|
<H2>3. Tests on insert(MutableTreeNode child, int index) method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_insert:0</td><td>Method adds NULL child to the receiver</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_insert:1</td><td>Method adds correct child to the receiver at index</td><td>Child is added</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_insert:2</td><td>Method adds correct child to the receiver at index=0</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_insert:3</td><td>Method adds correct child to the receiver at index=-2147483648</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_insert:4</td><td>Method adds correct child to the receiver at index=2147483647</td><td>Browser doesn't crashed</td></tr>
|
|
</table>
|
|
|
|
<A name=remove1>
|
|
<H2>4. Tests on remove(int index) method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_remove_1:0</td><td>Method removes the child at existed index from the receiver.</td><td>Child is removed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_remove_1:1</td><td>Method removes the child at index=0 from the receiver.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_remove_1:2</td><td>Method removes the child at index=-2147483648 from the receiver.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_remove_1:3</td><td>Method removes the child at index=2147483647 from the receiver.</td><td>Browser doesn't crashed</td></tr>
|
|
</table>
|
|
|
|
<A name=remove2>
|
|
<H2>5. Tests on remove(MutableTreeNode node) method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_remove_2:0</td><td>Method removes the NULL node from the receiver.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_remove_2:1</td><td>Method removes the existed node from the receiver.</td><td>Child is removed</td></tr>
|
|
</table>
|
|
|
|
<A name=remove3>
|
|
<H2>6. Tests on removeFromParent() method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_removeFromParent:0</td><td>Method removes the receiver from its parent=NULL.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_removeFromParent:1</td><td>Method Removes the receiver from its correct parent.</td><td>Reciever is removed</td></tr>
|
|
</table>
|
|
|
|
<A name=setParent>
|
|
<H2>7. Tests on setParent(MutableTreeNode newParent) method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_setParent:0</td><td>Method sets the parent of the receiver to newParent=NULL.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_setParent:1</td><td>Method sets the parent of the receiver to correct newParent.</td><td>newParent is set</td></tr>
|
|
</table>
|
|
|
|
<A name=setUO>
|
|
<H2>8. Tests on setUserObject(Object object) method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_setUserObject:0</td><td>Method resets the user object of the receiver to object=NULL.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_setUserObject:1</td><td>Method resets the user object of the receiver to correct object.</td><td>The user object is reseted</td></tr>
|
|
</table>
|
|
|
|
<A name=children>
|
|
<H2>9. Tests on children() method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_children:0</td><td>Method returns the children of the bookmarkFolder as an Enumeration.</td><td>Correct Enumeration object is returned.</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_children:1</td><td>Method returns the children of the bookmarkEntry as an Enumeration.</td><td>Browser doesn't crashed</td></tr>
|
|
</table>
|
|
|
|
<A name=getAllowsChildren>
|
|
<H2>10. Tests on getAllowsChildren() method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_getAllowsChildren:0</td><td>Method returns boolean result for the reciever=bookmarkFolder.</td><td>Result is true.</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getAllowsChildren:1</td><td>Method returns boolean result for the reciever=bookmarkEntry.</td><td>Result is false.</td></tr>
|
|
</table>
|
|
|
|
<A name=getChildAt>
|
|
<H2>11. Tests on getChildAt(int index) method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_getChildAt:0</td><td>Method tries to return the child of the bookmarkEntry.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getChildAt:1</td><td>Method returns the child at correct index.</td><td>Child is returned.</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getChildAt:2</td><td>Method tries to return the child at index=0.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getChildAt:3</td><td>Method tries to return the child at index=-2147483648.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getChildAt:4</td><td>Method tries to return the child at index=2147483647.</td><td>Browser doesn't crashed</td></tr>
|
|
</table>
|
|
|
|
<A name=getChildCount>
|
|
<H2>12. Tests on getChildCount() method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_getChildCount:0</td><td>Method returns the number of children the bookmarkFolder contains.</td><td>Correct number is returned.</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getChildCount:1</td><td>Method returns the number of children the bookmarkEntry contains.</td><td>Browser doesn't crashed</td></tr>
|
|
</table>
|
|
|
|
<A name=getIndex>
|
|
<H2>13. Tests on getIndex(TreeNode node) method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_getIndex:0</td><td>Method returns the index of node in the bookmarkFolder children.</td><td>Correct number is returned.</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getIndex:1</td><td>Method returns the index of node in the bookmarkEntry children.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getIndex:2</td><td>Method returns the index of node=NULL in the bookmarkFolder children.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getIndex:3</td><td>Method returns the index of node=bookmarkFolder in the bookmarkFolder children.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getIndex:4</td><td>Method returns the index of incorrect node in the bookmarkFolder children.</td><td>Browser doesn't crashed</td></tr>
|
|
</table>
|
|
|
|
<A name=getParent>
|
|
<H2>14. Tests on getParent() method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_getParent:0</td><td>Method returns the parent node of the reciever=bookmarkFolder, which has no parent.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getParent:1</td><td>Method returns the parent node of the reciever=bookmarkFolder, which has a parent.</td><td>Correct parent is returned.</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getParent:2</td><td>Method returns the parent node of the reciever=bookmarkEntry, which has no parent.</td><td>Browser doesn't crashed</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_getParent:3</td><td>Method returns the parent node of the reciever=bookmarkEntry, which has a parent.</td><td>Correct parent is returned.</td></tr>
|
|
</table>
|
|
|
|
<A name=isLeaf>
|
|
<H2>15. Tests on isLeaf() method.</H2>
|
|
<table border=1>
|
|
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
|
|
<tr><td>basic/api/BookmarkEntry_isLeaf:0</td><td>Method returns true if reciever=bookmarkFolder is a leaf.</td><td>True is returned.</td></tr>
|
|
<tr><td>basic/api/BookmarkEntry_isLeaf:1</td><td>Method returns true if reciever=bookmarkEntry is a leaf.</td><td>False is returned.</td></tr>
|
|
</table>
|
|
|
|
|
|
</body>
|
|
</html>
|