// Path: src/main/java/com/tibco/exchange/tibreview/exception/ParsingException.java
// public class ParsingException extends Exception {
// 
// 	private static final long serialVersionUID = 89526587L;
// 
// 	public ParsingException() {
// 		super();
// 	}
// 	
// 	public ParsingException(String message) {
// 		super(message);
// 	}
// 	
// 	public ParsingException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 	
// 	public ParsingException(Throwable cause) {
// 		super(cause);
// 	}
// }
// 
// Path: src/main/java/com/tibco/exchange/tibreview/model/rules/Resource.java
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "resource", propOrder = {
//     "rule"
// })
// public class Resource {
// 
//     @XmlElement(required = true)
//     protected List<Resourcerule> rule;
// 
//     /**
//      * Gets the value of the rule property.
//      * 
//      * <p>
//      * This accessor method returns a reference to the live list,
//      * not a snapshot. Therefore any modification you make to the
//      * returned list will be present inside the JAXB object.
//      * This is why there is not a <CODE>set</CODE> method for the rule property.
//      * 
//      * <p>
//      * For example, to add a new item, do as follows:
//      * <pre>
//      *    getRule().add(newItem);
//      * </pre>
//      * 
//      * 
//      * <p>
//      * Objects of the following type(s) are allowed in the list
//      * {@link Resourcerule }
//      * 
//      * 
//      */
//     public List<Resourcerule> getRule() {
//         if (rule == null) {
//             rule = new ArrayList<Resourcerule>();
//         }
//         return this.rule;
//     }
// 
// }
// 
// Path: src/main/java/com/tibco/exchange/tibreview/model/rules/Tibrules.java
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "tibrules", propOrder = {
//     "process",
//     "resource",
//     "xpathfunctions"
// })
// public class Tibrules {
// 
//     protected Process process;
//     protected Resource resource;
//     protected Xpathfunctions xpathfunctions;
// 
//     /**
//      * Gets the value of the process property.
//      * 
//      * @return
//      *     possible object is
//      *     {@link Process }
//      *     
//      */
//     public Process getProcess() {
//         return process;
//     }
// 
//     /**
//      * Sets the value of the process property.
//      * 
//      * @param value
//      *     allowed object is
//      *     {@link Process }
//      *     
//      */
//     public void setProcess(Process value) {
//         this.process = value;
//     }
// 
//     /**
//      * Gets the value of the resource property.
//      * 
//      * @return
//      *     possible object is
//      *     {@link Resource }
//      *     
//      */
//     public Resource getResource() {
//         return resource;
//     }
// 
//     /**
//      * Sets the value of the resource property.
//      * 
//      * @param value
//      *     allowed object is
//      *     {@link Resource }
//      *     
//      */
//     public void setResource(Resource value) {
//         this.resource = value;
//     }
// 
//     /**
//      * Gets the value of the xpathfunctions property.
//      * 
//      * @return
//      *     possible object is
//      *     {@link Xpathfunctions }
//      *     
//      */
//     public Xpathfunctions getXpathfunctions() {
//         return xpathfunctions;
//     }
// 
//     /**
//      * Sets the value of the xpathfunctions property.
//      * 
//      * @param value
//      *     allowed object is
//      *     {@link Xpathfunctions }
//      *     
//      */
//     public void setXpathfunctions(Xpathfunctions value) {
//         this.xpathfunctions = value;
//     }
// 
// }


import static org.junit.Assert.assertEquals;
import org.junit.Test;
import com.tibco.exchange.tibreview.exception.ParsingException;
import com.tibco.exchange.tibreview.model.rules.Resource;
import com.tibco.exchange.tibreview.model.rules.Tibrules;

package com.tibco.exchange.tibreview.parser;




public class RulesParserTest {

	@Test
	public void testParseFile() {
		try {
			Tibrules a = RulesParser.getInstance().parseFile("src/test/resources/tibrules.xml");
			Resource resource = a.getResource();

// Path: src/main/java/com/tibco/exchange/tibreview/exception/ParsingException.java
// public class ParsingException extends Exception {
// 
// 	private static final long serialVersionUID = 89526587L;
// 
// 	public ParsingException() {
// 		super();
// 	}
// 	
// 	public ParsingException(String message) {
// 		super(message);
// 	}
// 	
// 	public ParsingException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 	
// 	public ParsingException(Throwable cause) {
// 		super(cause);
// 	}
// }
// 
// Path: src/main/java/com/tibco/exchange/tibreview/model/rules/Resource.java
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "resource", propOrder = {
//     "rule"
// })
// public class Resource {
// 
//     @XmlElement(required = true)
//     protected List<Resourcerule> rule;
// 
//     /**
//      * Gets the value of the rule property.
//      * 
//      * <p>
//      * This accessor method returns a reference to the live list,
//      * not a snapshot. Therefore any modification you make to the
//      * returned list will be present inside the JAXB object.
//      * This is why there is not a <CODE>set</CODE> method for the rule property.
//      * 
//      * <p>
//      * For example, to add a new item, do as follows:
//      * <pre>
//      *    getRule().add(newItem);
//      * </pre>
//      * 
//      * 
//      * <p>
//      * Objects of the following type(s) are allowed in the list
//      * {@link Resourcerule }
//      * 
//      * 
//      */
//     public List<Resourcerule> getRule() {
//         if (rule == null) {
//             rule = new ArrayList<Resourcerule>();
//         }
//         return this.rule;
//     }
// 
// }
// 
// Path: src/main/java/com/tibco/exchange/tibreview/model/rules/Tibrules.java
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "tibrules", propOrder = {
//     "process",
//     "resource",
//     "xpathfunctions"
// })
// public class Tibrules {
// 
//     protected Process process;
//     protected Resource resource;
//     protected Xpathfunctions xpathfunctions;
// 
//     /**
//      * Gets the value of the process property.
//      * 
//      * @return
//      *     possible object is
//      *     {@link Process }
//      *     
//      */
//     public Process getProcess() {
//         return process;
//     }
// 
//     /**
//      * Sets the value of the process property.
//      * 
//      * @param value
//      *     allowed object is
//      *     {@link Process }
//      *     
//      */
//     public void setProcess(Process value) {
//         this.process = value;
//     }
// 
//     /**
//      * Gets the value of the resource property.
//      * 
//      * @return
//      *     possible object is
//      *     {@link Resource }
//      *     
//      */
//     public Resource getResource() {
//         return resource;
//     }
// 
//     /**
//      * Sets the value of the resource property.
//      * 
//      * @param value
//      *     allowed object is
//      *     {@link Resource }
//      *     
//      */
//     public void setResource(Resource value) {
//         this.resource = value;
//     }
// 
//     /**
//      * Gets the value of the xpathfunctions property.
//      * 
//      * @return
//      *     possible object is
//      *     {@link Xpathfunctions }
//      *     
//      */
//     public Xpathfunctions getXpathfunctions() {
//         return xpathfunctions;
//     }
// 
//     /**
//      * Sets the value of the xpathfunctions property.
//      * 
//      * @param value
//      *     allowed object is
//      *     {@link Xpathfunctions }
//      *     
//      */
//     public void setXpathfunctions(Xpathfunctions value) {
//         this.xpathfunctions = value;
//     }
// 
// }


// Path: src/test/java/com/tibco/exchange/tibreview/parser/RulesParserTest.java
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import com.tibco.exchange.tibreview.exception.ParsingException;
import com.tibco.exchange.tibreview.model.rules.Resource;
import com.tibco.exchange.tibreview.model.rules.Tibrules;

package com.tibco.exchange.tibreview.parser;




public class RulesParserTest {

	@Test
	public void testParseFile() {
		try {
			Tibrules a = RulesParser.getInstance().parseFile("src/test/resources/tibrules.xml");
			Resource resource = a.getResource();

			assertEquals(resource.getRule().size(), 26);
