Examples of asXml()


Examples of com.gargoylesoftware.htmlunit.html.HtmlScript.asXml()

        assertFalse(scripts.isEmpty());
       
        String eventString = null;
        for (Object obj : scripts) {
            HtmlScript element = (HtmlScript) obj;
            if (element.asXml().contains("Richfaces.componentControl.attachAvailable")) {
                eventString = element.asXml();
                break;
            }
        }
       
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan.asXml()

  HtmlSpan span = null;
        HtmlUnorderedList ulist = null;

  for (int i = 0; i < list.size(); i++) {
      span = (HtmlSpan) list.get(i);
      if (-1 != span.asXml().indexOf("dir=\"RTL\"")
                && span.asXml().indexOf("lang=\"de\"") != -1) {
                hasMessageContent = true;
            }
        }
        list = getAllElementsOfGivenClass(page, null, HtmlUnorderedList.class);
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlUnorderedList.asXml()

            }
        }
        list = getAllElementsOfGivenClass(page, null, HtmlUnorderedList.class);
        for (int i = 0; i < list.size(); i++) {
            ulist = (HtmlUnorderedList) list.get(i);
      if (-1 != ulist.asXml().indexOf("dir=\"LTR\"")
                && ulist.asXml().indexOf("lang=\"en\"") != -1) {
                hasMessagesContent = true;
            }
  }
  assertTrue(hasMessagesContent && hasMessageContent);
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.xml.XmlPage.asXml()

    private void checkXmlOutput(final String query, final HtmlForm form,
        boolean onlyClusters) throws IOException, Exception
    {
        final XmlPage dcsResponse = (XmlPage) clickSubmit(form);
        final String responseXml = dcsResponse.asXml();

        final ProcessingResult dcsResult = ProcessingResult
            .deserialize(new ByteArrayInputStream(responseXml.getBytes(UTF_8)));
        assertThat(dcsResult.getAttributes().get(AttributeNames.QUERY)).isEqualTo(query);
        if (onlyClusters)
View Full Code Here

Examples of com.github.restdriver.serverdriver.http.response.DefaultResponse.asXml()

        when(mockEntity.getContent()).thenReturn(IOUtils.toInputStream("This is not really xml, is it?", "utf-8"));
        HttpResponse mockResponse = createMockResponse(mockEntity);
        Response response = new DefaultResponse(mockResponse, 12345);
       
        try {
            response.asXml();
            Assert.fail();
           
        } catch (RuntimeXmlParseException rxpe) {
            assertThat(rxpe.getMessage(), is("Can't parse XML.  Bad content >> This is not real..."));
           
View Full Code Here

Examples of com.github.restdriver.serverdriver.http.response.Response.asXml()

                new ClientDriverResponse("<some><content type='awesome'/></some>", "text/xml"));
       
        Response response = get(baseUrl);
       
        assertThat(response, hasStatusCode(200));
        assertThat(response.asXml(), hasXPath("/some/content/@type", is("awesome")));
    }
   
    @Test
    public void xPathCanBeRunOnTextResponse() {
       
View Full Code Here

Examples of com.google.appengine.api.xmpp.MessageBuilder.asXml()

            throw new RuntimeException("You have to choose between XML and text bodies, you can't have both!");
        }

        // sets the body of the message
        if (msgAttr.containsKey(XML_BODY_ATTR)) {
            msgBuilder.asXml(true);
            Object xml = new StreamingMarkupBuilder().bind(msgAttr.get(XML_BODY_ATTR));
            msgBuilder.withBody(String.valueOf(xml));
        } else if (msgAttr.containsKey(TEXT_BODY_ATTR)) {
            msgBuilder.withBody(String.valueOf(msgAttr.get(TEXT_BODY_ATTR)));
        }
View Full Code Here

Examples of com.liferay.portal.kernel.xml.Document.asXML()

            Element exceptionsElement = rootElement.addElement("exceptions");

            _addElements(exceptionsElement, exceptionElements);
        }

        return document.asXML();
    }

    public static void main(String[] args) {
        Map<String, String> arguments = ArgumentsUtil.parseArguments(args);
View Full Code Here

Examples of net.jsunit.XmlRenderable.asXml()

  private Logger logger = Logger.getLogger(XmlResult.class.getName());
 
    public void execute(ActionInvocation invocation) throws Exception {
        XmlProducer producer = (XmlProducer) invocation.getAction();
        XmlRenderable xmlRenderable = producer.getXmlRenderable();
        Element element = xmlRenderable.asXml();
        Document document = new Document(element);
        String xmlString = XmlUtility.asString(document);
        HttpServletResponse response = ServletActionContext.getResponse();
        response.setContentType("text/xml");
        try {
View Full Code Here

Examples of net.jsunit.configuration.AggregateConfiguration.asXml()

        AggregateConfiguration configuration = new AggregateConfiguration(new DummyConfigurationSource());
        AggregateConfigurationAction action = new AggregateConfigurationAction();
        action.setAggregateServer(new JsUnitAggregateServer(configuration));

        assertEquals(Action.SUCCESS, action.execute());
        assertEquals(XmlUtility.asPrettyString(configuration.asXml()), XmlUtility.asPrettyString(action.asXml()));
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.