package com.intuit.tank.http.xml; /* * #%L * Intuit Tank Agent (apiharness) * %% * Copyright (C) 2011 - 2015 Intuit Inc. * %% * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * #L% */ import java.io.File; import java.util.ArrayList; import java.util.HashMap; import org.jdom.Document; import org.junit.*; import com.intuit.tank.http.xml.GenericXMLHandler; import static org.junit.Assert.*; /** * The class <code>GenericXMLHandlerTest</code> contains tests for the class <code>{@link GenericXMLHandler}</code>. * * @generatedBy CodePro at 12/16/14 4:29 PM */ public class GenericXMLHandlerTest { /** * Run the GenericXMLHandler() constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_1() throws Exception { GenericXMLHandler result = new GenericXMLHandler(); // An unexpected exception was thrown in user code while executing this test: // java.lang.ExceptionInInitializerError // at org.apache.log4j.LogManager.getLogger(Logger.java:117) // at com.intuit.tank.http.xml.GenericXMLHandler.<clinit>(GenericXMLHandler.java:31) assertNotNull(result); } /** * Run the GenericXMLHandler(File) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_2() throws Exception { File xmlFile = new File(""); GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(File) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_3() throws Exception { File xmlFile = new File(""); GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(File) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_4() throws Exception { File xmlFile = new File(""); GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(String) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_5() throws Exception { String xmlFile = ""; GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(String) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_6() throws Exception { String xmlFile = ""; GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(String) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_7() throws Exception { String xmlFile = ""; GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(String) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_8() throws Exception { String xmlFile = ""; GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(String) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_9() throws Exception { String xmlFile = ""; GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(String) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_10() throws Exception { String xmlFile = ""; GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(String) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_11() throws Exception { String xmlFile = ""; GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the GenericXMLHandler(String) constructor test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGenericXMLHandler_12() throws Exception { String xmlFile = ""; GenericXMLHandler result = new GenericXMLHandler(xmlFile); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String GetElementAttr(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetElementAttr_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String result = fixture.GetElementAttr(xPathExpression); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String GetElementAttr(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetElementAttr_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String result = fixture.GetElementAttr(xPathExpression); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String GetElementText(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetElementText_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String result = fixture.GetElementText(xPathExpression); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String GetElementText(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetElementText_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String result = fixture.GetElementText(xPathExpression); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String GetElementText(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetElementText_3() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String result = fixture.GetElementText(xPathExpression); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the void Save() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSave_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); fixture.Save(); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the void Save() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSave_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); fixture.Save(); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the void Save() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSave_3() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); fixture.Save(); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the void Save() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSave_4() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); fixture.Save(); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the void Save() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSave_5() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); fixture.Save(); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the void SetElementAttribute(String,String,String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSetElementAttribute_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String attribute = ""; String value = ""; fixture.SetElementAttribute(xPathExpression, attribute, value); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the void SetElementAttribute(String,String,String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSetElementAttribute_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String attribute = ""; String value = ""; fixture.SetElementAttribute(xPathExpression, attribute, value); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the void SetElementText(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSetElementText_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String value = ""; fixture.SetElementText(xPathExpression, value); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the void SetElementText(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSetElementText_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xPathExpression = ""; String value = ""; fixture.SetElementText(xPathExpression, value); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the Object clone() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testClone_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); Object result = fixture.clone(); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the Object clone() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testClone_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); Object result = fixture.clone(); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String getChildNode(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetChildNode_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xpath = ""; String result = fixture.getChildNode(xpath); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String getChildNode(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetChildNode_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xpath = ""; String result = fixture.getChildNode(xpath); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String getCurrentPath(String,int) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetCurrentPath_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xpath = ""; int node = -1; String result = fixture.getCurrentPath(xpath, node); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String getParentPath(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetParentPath_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xpath = ""; String result = fixture.getParentPath(xpath); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the String getParentPath(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testGetParentPath_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xpath = ""; String result = fixture.getParentPath(xpath); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the boolean isXMLValid() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testIsXMLValid_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("src/test/resources/tt.xml")); boolean result = fixture.isXMLValid(); assertTrue(result); } /** * Run the boolean isXMLValid() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testIsXMLValid_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); boolean result = fixture.isXMLValid(); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertTrue(result); } /** * Run the void setNamespace(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testSetNamespace_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String name = ""; String value = ""; fixture.setNamespace(name, value); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler } /** * Run the String toString() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testToString_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = null; String result = fixture.toString(); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertNotNull(result); } /** * Run the boolean xPathExists(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testXPathExists_1() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("")); fixture.namespaces = new HashMap(); fixture.xml = ""; fixture.xmlDocument = new Document(); String xpathExpr = ""; boolean result = fixture.xPathExists(xpathExpr); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertTrue(!result); } /** * Run the boolean xPathExists(String) method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 4:29 PM */ @Test public void testXPathExists_2() throws Exception { GenericXMLHandler fixture = new GenericXMLHandler(new File("src/test/resources/tt.xml")); fixture.namespaces = new HashMap(); String xpathExpr = "testPlan/testSuite"; boolean result = fixture.xPathExists(xpathExpr); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.http.xml.GenericXMLHandler assertTrue(result); } }