Operation |
Details |
protected static assertXMLExist( String message, Node node, String xPath):void |
Sequential Notes: | Assert that the Element/Attribute selected by the xPath exists. | |
protected static assertXMLValid( String xmlData, String schemaFileName):void |
Sequential Notes: | Assert that the XML is valid to the schema. | |
protected static getAttributeValue( Node node, String xPath, String attributeName):String |
Sequential Notes: | Return the text value of the selected attribute NOT considering namespaces. @return The text value of the selected attribute. | |
protected static getAttributeValueNS( Node node, String xPath, String attributeNamespaceURI, String attributeLocalName):String |
Sequential Notes: | Return the text value of the selected attribute considering namespaces. @return The value for the given attribute. | |
protected static getDocument( String xml, boolean namespaceAwareness):Document |
Sequential Notes: | Parse the given xml String into a Document. @return The Document. | |
protected static getRootElementAttributeValue( Document document, String attributeName):String |
Sequential Notes: | Gets the value of the specified attribute of the root element from the document. @return The attribute value. | |
private static getSchema( String schemaFileName):Schema |
Sequential Notes: | Gets the <code>Schema</code> object for the provided <code>File</code>. @param schemaStream The file containing the schema. @return The <code>Schema</code> object. | |
protected getValue( Document document, String xpathExpression):String |
Sequential Tags: | throws=TransformerException
| Notes: | Gets a value from the document for the given xpath expression. @param xPath The xpath to select the node containing the attribute. @return The value for the xpath expression. | |
protected loginAuthor():String |
Sequential Notes: | Logs in the user test_author who is nothing but an author and returns the corresponding user handle. @return A handle for the logged in user. | |
protected loginLibrarian():String |
Sequential Tags: | throws=ServiceException,HttpException,IOException,URISyntaxException
| Notes: | Logs in the user test_dep_lib and returns the corresponding user handle. @return A handle for the logged in user. | |
protected loginScientist():String |
Sequential Tags: | throws=ServiceException,HttpException,IOException,URISyntaxException
| Notes: | Logs in the user test_dep_scientist and returns the corresponding user handle. @return A handle for the logged in user. | |
protected loginSystemAdministrator():String |
Sequential Notes: | Logs in the user roland who is a system administrator and returns the corresponding user handle. @return A handle for the logged in user. | |
protected loginUser( String userid, String password):String |
Sequential Tags: | throws=HttpException,IOException,ServiceException,URISyntaxException
| Notes: | Logs in the given user with the given password. @return The handle for the logged in user. | |
protected logout( String userHandle):void |
Sequential Tags: | throws=WebserverSystemException,SqlDatabaseSystemException,AuthenticationException,RemoteException,ServiceException,URISyntaxException
| Notes: | Logs out the user with the given userhandle from the system. @return userHandle The handle for the logged in user. | |
protected readFile( String fileName):String |
Sequential Tags: | throws=IOException,FileNotFoundException
| Notes: | Reads contents from text file and returns it as String. @return The entire contents of the filename as a String. | |
protected static selectNodeList( Node node, String xpathExpression):NodeList |
Sequential Tags: | throws=TransformerException
| Notes: | Return the list of children of the node selected by the xPath. @param xPath The xPath expression. @return The list of children of the node selected by the xPath. | |
protected static selectSingleNode( Node node, String xpathExpression):Node |
Sequential Tags: | throws=TransformerException
| Notes: | Return the child of the node selected by the xPath. @param xPath The xPath expression. @return The child of the node selected by the xPath. | |
public setUp():void |
Sequential Tags: | annotations=@Before throws=Exception
| Notes: | Logs in as the default user before each test case. | |
public tearDown():void |
Sequential Tags: | annotations=@After throws=Exception
| Notes: | Logs the user out after each test case. | |
protected static toString( Node xml, boolean omitXMLDeclaration):String |
Sequential Notes: | Serialize the given Dom Object to a String. @return The String representation of the Xml Node. | |