Examples of under()


Examples of org.jboss.dna.graph.request.CreateNodeRequest.under()

                                  String... properties ) {
        Request nextCommand = iterator.next();
        assertThat(nextCommand, is(instanceOf(CreateNodeRequest.class)));
        CreateNodeRequest createNode = (CreateNodeRequest)nextCommand;
        Path expectedPath = context.getValueFactories().getPathFactory().create(path);
        Path parentPath = createNode.under().getPath();
        assertThat(parentPath, is(expectedPath.getParent()));
        assertThat(createNode.named(), is(expectedPath.getLastSegment().getName()));

        if (properties.length > 0) {
            Map<Name, Property> propertiesByName = new HashMap<Name, Property>();
View Full Code Here

Examples of org.jboss.dna.graph.request.CreateNodeRequest.under()

        // Create the expected path ...
        PathFactory factory = context.getValueFactories().getPathFactory();
        Path expectedPath = parentPath != null ? factory.create(parentPath, path) : factory.create("/" + path);
        // Now get the next request and compare the expected and actual ...
        CreateNodeRequest request = requests.remove();
        Path parentPath = request.under().getPath();
        assertThat(parentPath, is(expectedPath.getParent()));
        assertThat(request.named(), is(expectedPath.getLastSegment().getName()));

        if (properties.length != 0) {
            // Create the list of properties ...
View Full Code Here

Examples of org.jboss.dna.graph.request.CreateNodeRequest.under()

                for (Property expected : expectedProperties.values()) {
                    if (!isFirst) msg.append(", ");
                    else isFirst = false;
                    msg.append(expected.getName());
                }
                msg.append(" on node ").append(request.under());
                System.out.println("Found properties: " + request.properties());
                assertThat(msg.toString(), expectedProperties.isEmpty(), is(true));
            }
        }
    }
View Full Code Here

Examples of org.jboss.dna.graph.request.CreateNodeRequest.under()

            Property property = context.getPropertyFactory().create(name, values);
            expectedProperties.put(name, property);
        }

        CreateNodeRequest propertyRequest = requests.remove();
        Path parentPath = propertyRequest.under().getPath();
        assertThat(parentPath, is(expectedPath.getParent()));
        assertThat(propertyRequest.named(), is(expectedPath.getLastSegment().getName()));

        for (Property actual : propertyRequest.properties()) {
            Property expected = expectedProperties.remove(actual.getName());
View Full Code Here

Examples of org.jboss.dna.graph.request.CreateNodeRequest.under()

            for (Property expected : expectedProperties.values()) {
                if (!isFirst) msg.append(", ");
                else isFirst = false;
                msg.append(expected.getName());
            }
            msg.append(" on node ").append(propertyRequest.under());
            System.out.println("Found properties: " + propertyRequest.properties());
            assertThat(msg.toString(), expectedProperties.isEmpty(), is(true));
        }
    }
View Full Code Here

Examples of org.jboss.dna.graph.request.CreateNodeRequest.under()

                                              Property... properties ) {
        Name name = context.getValueFactories().getNameFactory().create(child);
        Request request = executedRequests.poll();
        assertThat(request, is(instanceOf(CreateNodeRequest.class)));
        CreateNodeRequest create = (CreateNodeRequest)request;
        assertThat(create.under(), is(parent));
        assertThat(create.named(), is(name));
        assertThat(create.properties(), hasItems(properties));
    }

    protected void assertNextRequestReadProperties( Location at,
View Full Code Here

Examples of org.springframework.core.ControlFlow.under()

  }

  public boolean matches(Method method, Class targetClass, Object[] args) {
    ++this.evaluations;
    ControlFlow cflow = ControlFlowFactory.createControlFlow();
    return (this.methodName != null) ? cflow.under(this.clazz, this.methodName) : cflow.under(this.clazz);
  }

  /**
   * It's useful to know how many times we've fired, for optimization.
   */
 
View Full Code Here

Examples of org.springframework.core.ControlFlow.under()

  }

  public boolean matches(Method method, Class targetClass, Object[] args) {
    ++this.evaluations;
    ControlFlow cflow = ControlFlowFactory.createControlFlow();
    return (this.methodName != null) ? cflow.under(this.clazz, this.methodName) : cflow.under(this.clazz);
  }

  /**
   * It's useful to know how many times we've fired, for optimization.
   */
 
View Full Code Here

Examples of org.springframework.core.ControlFlow.under()

  }

  public boolean matches(Method method, Class targetClass, Object[] args) {
    ++this.evaluations;
    ControlFlow cflow = ControlFlowFactory.createControlFlow();
    return (this.methodName != null) ? cflow.under(this.clazz, this.methodName) : cflow.under(this.clazz);
  }

  /**
   * It's useful to know how many times we've fired, for optimization.
   */
 
View Full Code Here

Examples of org.springframework.core.ControlFlow.under()

  }

  public boolean matches(Method method, Class targetClass, Object[] args) {
    ++this.evaluations;
    ControlFlow cflow = ControlFlowFactory.createControlFlow();
    return (this.methodName != null) ? cflow.under(this.clazz, this.methodName) : cflow.under(this.clazz);
  }

  /**
   * It's useful to know how many times we've fired, for optimization.
   */
 
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.