Examples of body()


Examples of com.jayway.restassured.response.Response.body()

        .expect()
        .statusCode( HttpStatus.SC_OK )
        //.content( is( driver.getResourceBytes( "hive/open-session-result.bin" ) ) )
        .contentType( "application/x-thrift" )
        .when().post( driver.getUrl( "HIVE" ) );
    assertThat( response.body().asByteArray(), is( driver.getResourceBytes( "hive/open-session-result.bin" ) ) );

    driver.assertComplete();

    // execute 'set hive.fetch.output.serde=...' (is called internally be JDBC driver)
    driver.getMock( "HIVE" )
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery.body()

            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/user/keys")
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.equalTo(
                    "{\"title\":\"theTitle\",\"key\":\"theKey\"}"
                )
            );
        } finally {
View Full Code Here

Examples of com.sissi.protocol.message.Message.body()

   * @see com.sissi.persistent.PersistentElement#read(java.util.Map)
   */
  @Override
  public Message read(Map<String, Object> element) {
    Message message = Message.class.cast(super.read(element, new Message()));
    return message.body(super.toString(element, Dictionary.FIELD_BODY)).delay(this.delay(element, message)).setThread(super.toString(element, Dictionary.FIELD_THREAD)).request(Boolean.valueOf(element.get(Dictionary.FIELD_ACK).toString()));
  }

  /*
   * 1, 符合Class 2, 符合isSupportMessage
   *
 
View Full Code Here

Examples of com.squareup.okhttp.Response.body()

  private String fetchString(final String url, final OkHttpClient client) throws IOException {

    final Request request = new Request.Builder().url(url).build();
    final Response response = client.newCall(request).execute();
    final String body = response.body().string();

    if (QueryUtil.isResponseError(body)) {
      throw new RuntimeException("API call has failed: " + body);
    }
View Full Code Here

Examples of com.sun.codemodel.JCatchBlock.body()

            "newXMLGregorianCalendar" ).arg( calendar ) );

        tryBlock.body()._return( JExpr._null() );

        final JCatchBlock catchBlock = tryBlock._catch( cm.ref( DatatypeConfigurationException.class ) );
        catchBlock.body()._throw( JExpr._new( cm.ref( AssertionError.class ) ).arg( catchBlock.param( "e" ) ) );

        createXMLGregorianCalendar.javadoc().append(
            "Creates a " + XMLGregorianCalendar.class.getName() + " instance from a " + Calendar.class.getName()
            + " instance." );
View Full Code Here

Examples of com.sun.codemodel.JForEach.body()

        clone.body().assign(copy.ref(jFieldVar),
            JExpr._new(arrayList.narrow(clazz)).arg(JExpr.direct("get" + Util.upperFirst(jFieldVar.name()) + "().size()")));
        final JForEach forEach = clone.body().forEach(clazz, "iter", jFieldVar);
        if (forEach.var().type().fullName().equals("java.lang.Object") || enums.contains(forEach.var().type().fullName()) || forEach.var().type().fullName().equals("java.lang.String") ){
          forEach.body().add(copy.ref(jFieldVar).invoke("add").arg(forEach.var()));
          LOG.info("444a>>>>>>>" + forEach.var().type().fullName());
        } else {
          forEach.body().add(copy.ref(jFieldVar).invoke("add").arg(forEach.var().invoke("clone")));
          LOG.info("444b>>>>>>>" + forEach.var().type().fullName()+".clone()");
        }
View Full Code Here

Examples of com.sun.codemodel.JForLoop.body()

      JBlock _ifListIsTooSmallThen = _ifListIsTooSmall._then();
      JForLoop _for = _ifListIsTooSmallThen._for();
      JVar i = _for.init(INT, "i", list.invoke("size"));
      _for.test(i.lte(index));
      _for.update(i.incr());
      _for.body().invoke(list, "add").arg(JExpr._null());

      JVar element = body.decl(elementClass, "value", list.invoke("get").arg(index));
      JConditional _ifElementIsNull = body._if(element.eq(JExpr._null()));
      JBlock _ifElementIsNullThen = _ifElementIsNull._then();
      _ifElementIsNullThen.assign(element, JExpr._new(element.type()));
View Full Code Here

Examples of com.sun.codemodel.JMethod.body()

    }

    private void addRouterMethod(JDefinedClass router, JDefinedClass definedClass) {
        String className = definedClass.fullName();
        JMethod method = router.method(generateMods, definedClass, definedClass.name());
        JBlock block = method.body();
        block.directStatement("return new " + className + "();");
    }
}
View Full Code Here

Examples of com.sun.codemodel.JTryBlock.body()

    generateMarshalOutputStream.javadoc().append(comment);

    // try {
    final JTryBlock tryBlock = generateMarshalOutputStream.body()._try();
    // m = this.createMarshaller();
    tryBlock.body().assign(mVar, JExpr._this().invoke(createMashaller));

    // JAXBElement<Kml> jaxbRootElement = new JAXBElement<Kml>(new QName("http://www.opengis.net/kml/2.2", "kml"), Kml.class, this);
//    JInvocation newJaxbElement = JExpr._new(jaxbElementClass).arg(createQName("http://www.opengis.net/kml/2.2", "kml")).arg(
//        kmlClass.boxify().dotclass()).arg(JExpr._this());
//    final JVar jaxbRootElementVar = tryBlock.body().decl(jaxbElementClass, "jaxbRootElement", newJaxbElement);
View Full Code Here

Examples of com.sun.codemodel.internal.JCatchBlock.body()

        JTryBlock tryBlock = staticBlock._try();
        tryBlock.body().assign(urlVar, JExpr._new(cm.ref(URL.class)).arg(wsdlLocation));
        JCatchBlock catchBlock = tryBlock._catch(cm.ref(MalformedURLException.class));
        catchBlock.param("ex");
        catchBlock.body().assign(exVar, JExpr._new(cm.ref(WebServiceException.class)).arg(JExpr.ref("ex")));

        staticBlock.assign(urlField, urlVar);
        staticBlock.assign(exField, exVar);
    }
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.