Package com.betfair.testing.utils.cougar.misc

Examples of com.betfair.testing.utils.cougar.misc.XMLHelpers


        /*
         * Due to changes in the main cougar engine where it expects the operation names
         * to start in lowercase, a bit of string handling to convert old tests' XML to
         * conform to the new standard.
         */
        XMLHelpers helper = new XMLHelpers();
        String tmp = document.getFirstChild().getNodeName();
        helper.renameRootElement(document, tmp.substring(0,1).toLowerCase(Locale.ENGLISH) + tmp.substring(1));
          root.appendChild( newDocument.importNode(document.getDocumentElement(), true)  );
         
      }catch (ParserConfigurationException e) {
      //  logger.LogBetfairDebugEntry("Parser Error Setting REST PostQueryObject. " + e.getMessage());
     
View Full Code Here


    //TODO change to be logged this does not work for some of the parsed docs
  /*  System.out.print(new XMLHelpers().getXMLAsString(expDocument));
    System.out.print("");
    System.out.print(new XMLHelpers().getXMLAsString(actDocument));*/

        String messagePrefix = "Expected: " + new XMLHelpers().getXMLAsString(expDocument) + ", actual: "+new XMLHelpers().getXMLAsString(actDocument);

        AssertionUtils.jettAssertEquals(messagePrefix+": Check number of keys in document: ", expNodes.size(), actNodes.size());

    Node previousExpNode = null;
    int counter = 0;
View Full Code Here

       
      }catch (ParserConfigurationException e) {     
        throw new RuntimeException("Error occured while wrapping existing REST request with a new root element ResponseOperationResponse.", e);
      }
      newDocument.getDocumentElement().setAttribute("xmlns", httpCallBean.getNameSpace());
      XMLHelpers helper = new XMLHelpers();
//      LogHelper.log(helper.getXMLAsString(newDocument));
    }
   
    if(newDocument == null){ // Return original document (for null messages & faults)
      returnMap.put(CougarMessageProtocolRequestTypeEnum.RESTXML, document);
View Full Code Here

        /*
         * Due to changes in the main cougar engine where it expects the operation names
         * to start in lowercase, a bit of string handling to convert old tests' XML to
         * conform to the new standard.
         */
        XMLHelpers helper = new XMLHelpers();
        String tmp = document.getFirstChild().getNodeName();
        helper.renameRootElement(document, tmp.substring(0,1).toLowerCase(Locale.ENGLISH) + tmp.substring(1));
          root.appendChild( newDocument.importNode(document.getDocumentElement(), true)  );
         
      }catch (ParserConfigurationException e) {
      //  logger.LogBetfairDebugEntry("Parser Error Setting REST PostQueryObject. " + e.getMessage());
     
View Full Code Here

TOP

Related Classes of com.betfair.testing.utils.cougar.misc.XMLHelpers

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.