Examples of match()


Examples of org.springframework.core.type.filter.AssignableTypeFilter.match()

    String classUnderTest = "org.springframework.core.type.AssignableTypeFilterTests$TestNonInheritingClass";
    MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(classUnderTest);

    AssignableTypeFilter matchingFilter = new AssignableTypeFilter(TestNonInheritingClass.class);
    AssignableTypeFilter notMatchingFilter = new AssignableTypeFilter(TestInterface.class);
    assertFalse(notMatchingFilter.match(metadataReader, metadataReaderFactory));
    assertTrue(matchingFilter.match(metadataReader, metadataReaderFactory));
  }
 
  public void testInterfaceMatch() throws Exception {
    MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory();

Examples of org.springframework.test.web.server.ResultMatcher.match()

      Method method = StatusResultMatchers.class.getMethod(methodName);
      try {
        ResultMatcher matcher = (ResultMatcher) ReflectionUtils.invokeMethod(method, resultMatchers);
        try {
          MvcResult mvcResult = new StubMvcResult(new MockHttpServletRequest(), null, null, null, null, null, response);
          matcher.match(mvcResult);
        }
        catch (AssertionError error) {
          failures.add(error);
        }
      }

Examples of org.springframework.test.web.servlet.ResultMatcher.match()

      MvcResult mvcResult = new StubMvcResult(request, null, null, null, null, null, response);
      try {
        Method method = getMethodForHttpStatus(status);
        ResultMatcher matcher = (ResultMatcher) ReflectionUtils.invokeMethod(method, this.matchers);
        try {
          matcher.match(mvcResult);
        }
        catch (AssertionError error) {
          failures.add(error);
        }
      }

Examples of org.springframework.util.AntPathMatcher.match()

    if (resourcePath.matches(PROTECTED_PATH)) {
      return false;
    }
    PathMatcher pathMatcher = new AntPathMatcher();
    for (String pattern : ALLOWED_RESOURCE_PATHS) {
      if (pathMatcher.match(pattern, resourcePath)) {
        return true;
      }
    }
    return false;
  }

Examples of org.springframework.util.PathMatcher.match()

    if (resourcePath.matches(PROTECTED_PATH)) {
      return false;
    }
    PathMatcher pathMatcher = new AntPathMatcher();
    for (String pattern : ALLOWED_RESOURCE_PATHS) {
      if (pathMatcher.match(pattern, resourcePath)) {
        return true;
      }
    }
    return false;
  }

Examples of org.springmodules.lucene.index.document.handler.DocumentMatching.match()

    assertTrue(documentMatching2.match("test.test.txt"));
  }

  public void testNotMatch() throws Exception {
    DocumentMatching documentMatching1 = new MimeTypeDocumentMatching("doc");
    assertFalse(documentMatching1.match("test.txt"));

    DocumentMatching documentMatching2 = new MimeTypeDocumentMatching("doc");
    assertFalse(documentMatching2.match("doc"));
  }
}

Examples of org.springsource.ide.eclipse.commons.internal.content.core.DescriptorMatcher.match()

    for (Descriptor descriptor : descriptors) {
      // Verify if the descriptor ID and version match an expected pattern
      // for the descriptor's
      // files. See the matcher for the actual matching criteria.
      if (!matcher.match(descriptor)) {
        continue;
      }
      ContentItem item = new ContentItem(descriptor.getId());
      item.setLocalDescriptor(descriptor);
      items.add(item);

Examples of org.stringtree.mojasef.routing.Mount.match()

        String path = context.get(MojasefConstants.REQUEST_LOCALPATH);
        Token status = Token.CONTINUE;
       
    while (status == Token.CONTINUE && it.hasNext()) {
      Mount mount = it.next();
      if (mount.match(path, context)) {
        status = Mojasef.delegate(collector, context, mount.getApplication());
      }
    }
   
    if (status == Token.CONTINUE) {

Examples of org.terrier.matching.Matching.match()

      }

      mqt.setQuery(q);
      mqt.normaliseTermWeights();
      try{
        ResultSet outRs = matching.match(rq.getQueryID(), mqt);
        //now crop the collectionresultset down to a query result set.
        rq.setResultSet(outRs.getResultSet(0, outRs.getResultSize()));
      } catch (IOException ioe) {
        logger.error("Problem running Matching, returning empty result set as query"+rq.getQueryID(), ioe);
        rq.setResultSet(new QueryResultSet(0));

Examples of org.tmatesoft.hg.core.HgStatusCommand.match()

  @Test
  public void testSubTreeStatus() throws Exception {
    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    StatusCollector sc = new StatusCollector();
    cmd.match(new PathGlobMatcher("*"));
    cmd.all().execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    /*
     * C .hgignore
     * ? file1
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.