Examples of AbstractExpression


Examples of com.agical.rmock.core.match.operator.AbstractExpression

        } catch (IllegalArgumentException e) {
        }
    }
   
    public void testRemoveClusterListener() throws Exception {
        AbstractExpression assertSame = new AssertSameWADIListener();
        wadiCluster.addClusterListener(null);
        modify().args(assertSame);
        wadiCluster.removeClusterListener(null);
        modify().args(assertSame);
       
View Full Code Here

Examples of com.agical.rmock.core.match.operator.AbstractExpression

   
    public void testRemoveListenersOnStopOrFail() throws Exception {
        wadiCluster.removeClusterListener(null);
        modify().args(is.NOT_NULL);

        AbstractExpression assertSame = new AssertSameWADIListener();
        wadiCluster.addClusterListener(null);
        modify().args(assertSame);
        wadiCluster.removeClusterListener(null);
        modify().args(assertSame);
       
View Full Code Here

Examples of com.agical.rmock.core.match.operator.AbstractExpression

            new Environment(configId),
            new File("configurationDir"),
            null,
            new Jsr77Naming());

        AbstractExpression assertConfigurationData = new AbstractExpression() {
            public void describeWith(ExpressionDescriber arg) throws IOException {
            }

            public boolean passes(Object arg) {
                assertSame(configurationData, arg);
View Full Code Here

Examples of com.agical.rmock.core.match.operator.AbstractExpression

        delegate.createNewConfigurationDir(masterId);
        final File masterDir = new File("masterDir");
        modify().returnValue(masterDir);

        delegate.install(null);
        modify().args(new AbstractExpression() {
            public void describeWith(ExpressionDescriber arg) throws IOException {
            }

            public boolean passes(Object arg) {
                ConfigurationData configurationData = (ConfigurationData) arg;
View Full Code Here

Examples of com.agical.rmock.core.match.operator.AbstractExpression

        nodeName = "NODE";
        sessionId = globalSessionId + "." + nodeName;

        sessionManager = (SessionManager) mock(SessionManager.class);
        sessionManager.registerListener(null);
        modify().args(new AbstractExpression() {
            public void describeWith(ExpressionDescriber arg0) throws IOException {
            }
           
            public boolean passes(Object arg0) {
                sessionListener = (SessionListener) arg0;
View Full Code Here

Examples of com.agical.rmock.core.match.operator.AbstractExpression

        request.getServerHash();
        modify().returnValue(server.buildHash() + 1);

        response.setServer(null);
        modify().args(new AbstractExpression() {
            public void describeWith(ExpressionDescriber arg0) throws IOException {
            }

            public boolean passes(Object arg0) {
                ServerMetaData actualServer = (ServerMetaData) arg0;
View Full Code Here

Examples of com.agical.rmock.core.match.operator.AbstractExpression

        request.getServerHash();
        modify().returnValue(server.buildHash() + 1);

        response.setServer(null);
        modify().args(new AbstractExpression() {
            @Override
            public void describeWith(ExpressionDescriber arg0) throws IOException {
            }

            @Override
View Full Code Here

Examples of eu.bitfish.jcf.common.expression.AbstractExpression

  }

  @Override
  public <T> List<T> execute(final Collection<T> collection,
      final String query) throws ParsingException, FilterException {
    AbstractExpression ex = getParser().parse(query);

    // TODO allow all whitespaces in value!!!

    final List<T> filtered = new ArrayList<>();
    for (T obj : collection) {
      if (ex.evaluate(obj)) {
        filtered.add(obj);

        // if the order is set we have to add all items before limiting
        // the result
        if (ex.getLimit() != -1 && ex.getOrder() == null
            && ex.getLimit() == filtered.size()) {
          break;
        }
      }
    }

    if (ex.getOrder() != null) {
      Collections.sort(filtered, ex.getOrder());

      if (ex.getLimit() != -1) {
        return filtered.subList(0, ex.getLimit());
      }
    }

    return filtered;
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.internal.jpql.parser.AbstractExpression

      if (expression.endsWithComma()) {
        complete = true;
      }

      int lastIndex = expression.childrenSize() - 1;
      AbstractExpression child = (AbstractExpression) expression.getChild(lastIndex);

      // The collection ends with an empty element, that's not complete
      if (isNull(child)) {
        complete = false;
      }
      else {
        int length = expression.toActualText(positionInCollections.peek()).length();

        // The position is at the beginning of the child expression, that means
        // it's complete because we don't have to verify the child expression
        if (corrections.peek() == length) {
          int index = Math.max(0, positionInCollections.peek() - 1);
          complete = expression.hasComma(index);
        }
        // Dig into the child expression to check its status
        else {
          child.accept(this);
        }
      }
    }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.AbstractExpression

      if (expression.endsWithComma()) {
        complete = true;
      }

      int lastIndex = expression.childrenSize() - 1;
      AbstractExpression child = (AbstractExpression) expression.getChild(lastIndex);

      // The collection ends with an empty element, that's not complete
      if (isNull(child)) {
        complete = false;
      }
      else {
        int length = expression.toActualText(positionInCollections.peek()).length();

        // The position is at the beginning of the child expression, that means
        // it's complete because we don't have to verify the child expression
        if (corrections.peek() == length) {
          int index = Math.max(0, positionInCollections.peek() - 1);
          complete = expression.hasComma(index);
        }
        // Dig into the child expression to check its status
        else {
          child.accept(this);
        }
      }
    }
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.