/**
 * 
 */
package org.etsi.saref.server.outputformatter;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 * @author Omar Qawasmeh
 *
 *
 */


@XmlRootElement(name = "testcase")
@XmlType(propOrder = { "systemErr", "systemOut", "info"})
public class TestCase {


	private String name;
	private String className;
	private String systemErr;
	private String systemOut;
	private String status; //either pass or failure
	private String info;
	private boolean statusFlag;
	
	/**
	 * @return the status
	 */
	@XmlAttribute
	public String getStatus() {
		return status;
	}
	
	/**
	 * @param status the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}
	
	
	public boolean getStatusFlag() {
		return statusFlag;
	}
	
	/**
	 * @param status the status to set
	 */
	public void setStatusFlag(String status) {
		if(status.equals("fail"))
			this.statusFlag = false;
		else if(status.equals("pass"))
			this.statusFlag = true;
		
		
	}
	
	

	@XmlAttribute
	public String getClassName() {
		return className;
	}
	
	/**
	 * @param className the className to set
	 */
	public void setClassName(String className) {
		this.className = className;
	}
	
	
	@XmlAttribute
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	
	/**
	 * @return the systemErr
	 */
	public String getSystemErr() {
		return systemErr;
	}
	
	/**
	 * @param systemErr the systemErr to set
	 */
	public void setSystemErr(String systemErr) {
		this.systemErr = systemErr;
	}
	
	/**
	 * @return the systemOut
	 */
	public String getSystemOut() {
		return systemOut;
	}
	
	/**
	 * @param systemOut the systemOut to set
	 */
	public void setSystemOut(String systemOut) {
		this.systemOut = systemOut;
	}

	/**
	 * @return the info
	 */
	public String getInfo() {
		return info;
	}
	
	/**
	 * @param info the info to set
	 */
	public void setInfo(String info) {
		this.info = info;
	}
	
}
