Examples of matches()


Examples of org.mockito.internal.matchers.Any.matches()

        // when
        ByteArrayOutputStream serialized = serializeMock(anyMock);

        // then
        Any readObject = deserializeMock(serialized, Any.class);
        readObject.matches("");
    }

    class AlreadySerializable implements Serializable {}

    @Test

Examples of org.mockserver.matchers.HttpRequestMatcher.matches()

    public synchronized List<HttpResponse> httpResponses(HttpRequest httpRequest) {
        List<HttpResponse> httpResponses = new ArrayList<HttpResponse>();
        HttpRequestMatcher httpRequestMatcher = matcherBuilder.transformsToMatcher(httpRequest);
        for (HttpRequest loggedHttpRequest : requestResponseLog.keySet()) {
            if (httpRequestMatcher.matches(loggedHttpRequest)) {
                httpResponses.addAll(requestResponseLog.getAll(loggedHttpRequest));
            }
        }
        return httpResponses;
    }

Examples of org.mockserver.matchers.HttpResponseMatcher.matches()

        if (httpResponse != null) {
            List<Expectation> matchingExpectations = new ArrayList<Expectation>();
            HttpResponseMatcher httpResponseMatcher = new HttpResponseMatcher(httpResponse);
            for (Expectation expectation : expectations) {
                if (httpResponseMatcher.matches(expectation.getHttpResponse(false))) {
                    matchingExpectations.add(expectation);
                }
            }
            expectations = matchingExpectations.toArray(new Expectation[matchingExpectations.size()]);
        }

Examples of org.mockserver.mock.Expectation.matches()

        ForwardChainExpectation forwardChainExpectation = mockServerClient.when(httpRequest);
        forwardChainExpectation.respond(httpResponse);

        // then
        Expectation expectation = forwardChainExpectation.getExpectation();
        assertTrue(expectation.matches(httpRequest));
        assertSame(httpResponse, expectation.getHttpResponse(false));
        assertEquals(Times.unlimited(), expectation.getTimes());
    }

    @Test

Examples of org.mockserver.mockserver.MappedRequest.matches()

                ctx.pipeline().addAfter(ctx.name(), HttpConnectHandler.class.getSimpleName(), new HttpConnectHandler(connectSocket, true));
                ctx.pipeline().remove(this);
                ctx.fireChannelRead(request);

            } else if (mappedRequest.matches(HttpMethod.PUT, "/dumpToLog")) {

                List<String> typeValues = mappedRequest.parameters().get("type");
                boolean asJava = typeValues != null && !typeValues.isEmpty() && "java".equals(typeValues.get(0));
                logFilter.dumpToLog((mappedRequest.content() != null ? httpRequestSerializer.deserialize(mappedRequest.content()) : null), asJava);
                writeResponse(ctx, request, HttpResponseStatus.ACCEPTED);

Examples of org.modeshape.common.text.TokenStream.matches()

        Tokenizer tokenizer = new CndTokenizer(false, true);
        TokenStream tokens = new TokenStream(content, tokenizer, false);
        tokens.start();
        while (tokens.hasNext()) {
            // Keep reading while we can recognize one of the two types of statements ...
            if (tokens.matches("<", ANY_VALUE, "=", ANY_VALUE, ">")) {
                parseNamespaceMapping(tokens);
            } else if (tokens.matches("[", ANY_VALUE, "]")) {
                parseNodeTypeDefinition(tokens);
            } else {
                Position position = tokens.previousPosition();

Examples of org.modeshape.jcr.query.xpath.XPath.NameTest.matches()

                assert operandBuilder != null;
                if (spec.getAttributeName() != null) {
                    // This order by is defined by an attribute ...
                    NameTest attribute = spec.getAttributeName();
                    assert !attribute.isWildcard();
                    if (attribute.matches("jcr", "path")) {
                        String pathOf = tableName;
                        if (pathOf == null) pathOf = aliases.iterator().next();
                        operandBuilder.path(pathOf);
                    } else {
                        operandBuilder.propertyValue(tableName, attribute.toString());

Examples of org.modeshape.jcr.sequencer.SequencerPathExpression.Matcher.matches()

                    String strPath = stringFactory.create(nodePath);
                    Name propName = added.getProperty().getName();
                    // Check if the property is sequencable ...
                    for (SequencingConfiguration config : configs) {
                        Matcher matcher = config.matches(strPath, propName);
                        if (!matcher.matches()) {
                            if (TRACE) {
                                LOGGER.trace("Added property '{1}:{0}' in repository '{2}' did not match sequencer '{3}' and path expression '{4}'",
                                             added.getPath(), workspaceName, repository.name(), config.getSequencer().getName(),
                                             config.getPathExpression());
                            }

Examples of org.modeshape.sequencer.ddl.DdlTokenStream.matches()

        tokens.consume(L_PAREN); // must have opening paren
        int numLeft = 1;
        int numRight = 0;

        // must have content between the parens
        if (!tokens.matches(R_PAREN)) {
            final List<String> possibleColumns = new ArrayList<String>(); // dimension table columns
            final List<String> functions = new ArrayList<String>(); // functions, constants
            final StringBuilder text = new StringBuilder();
            boolean isFunction = false;

Examples of org.objectstyle.wolips.core.resources.pattern.IPattern.matches()

  }

  public boolean matches(String string) {
    for (int i = 0; i < this.patternList.size(); i++) {
      IPattern pattern = this.patternList.get(i);
      if (pattern.matches(string)) {
        return true;
      }
    }
    return false;
  }
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.