Examples of use()


Examples of br.com.caelum.restfulie.opensearch.SearchDescription.use()

  }

  private Response search(String term, int page) {
    Response response = restfulie.at("http://localhost:3000/products/opensearch.xml").accept("application/opensearchdescription+xml").get();
    SearchDescription desc = response.getResource();
    response = desc.use("application/xml").with(queryFor(term)).and(page(page)).get();
    return response;
  }

  private Order newOrder(String address) {
    Order order = new Order();
View Full Code Here

Examples of br.com.caelum.vraptor.Result.use()

   */
  @Test
  public void shouldForwardToTheRightDefaultValue() throws Exception {
    Result result = mock(Result.class);
    PageResult pageResult = new DefaultPageResult(request, response, methodInfo, resolver, proxifier);
    when(result.use(PageResult.class)).thenReturn(pageResult);
    when(container.instanceFor(TheComponent.class)).thenReturn(new TheComponent(result));
    when(resolver.pathFor(argThat(sameMethodAs(TheComponent.class.getDeclaredMethod("method"))))).thenReturn("controlled!");
    when(request.getRequestDispatcher(anyString())).thenThrow(new AssertionError("should have called with the right method!"));
    doReturn(dispatcher).when(request).getRequestDispatcher("controlled!");

View Full Code Here

Examples of com.google.gwt.dev.jjs.impl.gflow.liveness.LivenessAssumption.Updater.use()

    node.accept(new CfgVisitor() {
      @Override
      public void visitReadNode(CfgReadNode node) {
        JVariable target = node.getTarget();
        if (target instanceof JLocal || target instanceof JParameter) {
          result.use(target);
        }
      }

      @Override
      public void visitReadWriteNode(CfgReadWriteNode node) {
View Full Code Here

Examples of com.jetdrone.vertx.yoke.Yoke.use()

public class VHost extends TestVerticle {

    @Test
    public void testLimit() {
        Yoke yoke = new Yoke(this);
        yoke.use(new Vhost("*.com", new Handler<HttpServerRequest>() {
            @Override
            public void handle(HttpServerRequest request) {
                request.response().end();
                testComplete();
            }
View Full Code Here

Examples of com.sun.sgs.kernel.TaskReservation.use()

    @Test (expected=IllegalStateException.class)
        public void cancelAfterUseReservedTaskDelayed() throws Exception {
        TaskReservation reservation =
            taskScheduler.reserveTask(testTask, taskOwner,
                                      System.currentTimeMillis() + 50);
        reservation.use();
        reservation.cancel();
    }

    @Test (expected=IllegalStateException.class)
        public void useAfterCancelReservedTask() throws Exception {
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute.use()

                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("required");
            }
        }

        private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) {
            if( ap.isCollection() )
View Full Code Here

Examples of com.sun.xml.internal.bind.v2.schemagen.xmlschema.LocalAttribute.use()

                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("required");
            }
        }

        private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) {
            if( ap.isCollection() )
View Full Code Here

Examples of com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType.use()

        TypedXmlWriter input = operation.input();
        extension.addBindingOperationInputExtension(input, method);
        BodyType body = input._element(Body.class);
        boolean isRpc = soapBinding.getStyle().equals(Style.RPC);
        if (soapBinding.getUse()==Use.LITERAL) {
            body.use(LITERAL);
            if (headerParams.size() > 0) {
                if (bodyParams.size() > 0) {
                    ParameterImpl param = bodyParams.iterator().next();
                    if (isRpc) {
                        StringBuffer parts = new StringBuffer();
View Full Code Here

Examples of com.sun.xml.internal.ws.wsdl.writer.document.soap.Header.use()

        for (ParameterImpl headerParam : parameters) {
            Header header = writer._element(Header.class);
            header.message(message);
            header.part(headerParam.getPartName());
            header.use(LITERAL);
        }
    }

    /**
     *
 
View Full Code Here

Examples of com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPFault.use()

        }
        for (CheckedExceptionImpl exception : method.getCheckedExceptions()) {
            Fault fault = operation.fault().name(exception.getMessageName());
            extension.addBindingOperationFaultExtension(fault, method, exception);
            SOAPFault soapFault = fault._element(SOAPFault.class).name(exception.getMessageName());
            soapFault.use(LITERAL);
        }
    }

    protected void generateSOAP12BindingOperation(JavaMethodImpl method, Binding binding) {
        BindingOperationType operation = binding.operation().name(method.getOperationName());
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.