Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.testtoolinterfaces.testsuiteinterface;
  
XmlHandler to read a sequence of teststeps from a TTI-XML file. <[tag]> <teststep> ... </teststep> </[tag]> <[tag]> <if> ... </if> </[tag]>

Author(s):
Arjan Kranenburg
See also:
http://www.testtoolinterfaces.org
 
 public class TestStepSequenceXmlHandler extends XmlHandler
 {
 	// These are used for legacy reasons
 	private static final String TAG_ACTION   = "action";
 	private static final String TAG_CHECK    = "check";
 	
     private TestStepSequence mySteps;
 
 	
 //	private ArrayList<StepType> myAllowedStepTypes;
 	
 	private boolean myCheckStepParameter;

Creates the XML Handler

Parameters:
anXmlReader the xmlReader
aTag the start-element for this XML Handler
anInterfaceList a list of interfaces
aCheckStepParameter flag to indicate if specified parameters of a step must be verified in the interface
 
 	public TestStepSequenceXmlHandlerXMLReader anXmlReader,
 	                                   String aTag,
 //	                                   ArrayList<StepType> anAllowedStepTypes,
 	                                   TestInterfaceList anInterfaceList,
 	                                   boolean aCheckStepParameter )
 	{
 		super(anXmlReaderaTag);
 		Trace.println(."TestStepSequenceXmlHandler( anXmlreader, " + aTag + " )"true);
 
 		 = new TestStepXmlHandler(anXmlReaderanInterfaceListaCheckStepParameter);
 
 		// myIfXmlHandler is created when needed to prevent loops
 		
 		 = new TestStepXmlHandler(anXmlReaderanInterfaceListaCheckStepParameter);
 
 		 = new TestStepXmlHandler(anXmlReaderanInterfaceListaCheckStepParameter);
 
 		 = anInterfaceList;
 		 = aCheckStepParameter;
 		
 		this.reset();
 	}
 
     public void processElementAttributes(String aQualifiedNameAttributes anAtt)
     {
     	//nop
     }
 
 	public void handleStartElement(String aQualifiedName)
 	{
     	//nop
 	}
 
 	public void handleCharacters(String aValue)
 	{
 		//nop
 	}
	public void handleEndElement(String aQualifiedName)
	{
    	//nop
	}
	public void handleGoToChildElement(String aQualifiedName)
	{
     	if (  == null && aQualifiedName.equalsIgnoreCase(.) )
    	{
     		// We'll create a TestStepXmlHandler for if-steps only when we need it.
     		// Otherwise it would create an endless loop.
    	}
	}
	public void handleReturnFromChildElement(String aQualifiedNameXmlHandler aChildXmlHandler)
	{
    	{
    	}
    	else if (aQualifiedName.equalsIgnoreCase(.))
    	{
    	}
    	else if (aQualifiedName.equalsIgnoreCase())
    	{
        	.reset();
    	}
    	else if (aQualifiedName.equalsIgnoreCase())
    	{
        	.reset();
    	}
    	else
    	{ // Programming fault
			throw new Error"Child XML Handler returned, but not recognized. The handler was probably defined " +
			                 "in the Constructor but not handled in handleReturnFromChildElement()");
    	}
	}

Returns:
the TestStepSequence
	{
		return ;
	}
	public void reset()
	{
	}
New to GrepCode? Check out our FAQ X