Examples of check()


Examples of org.languagetool.JLanguageTool.check()

  public void testMultipleSentences() throws IOException {
    final JLanguageTool tool = new JLanguageTool(new English());
    tool.enableRule("EN_UNPAIRED_BRACKETS");

    List<RuleMatch> matches;
    matches = tool
        .check("This is multiple sentence text that contains a bracket: "
            + "[This is bracket. With some text.] and this continues.\n");
    assertEquals(0, matches.size());
    matches = tool
        .check("This is multiple sentence text that contains a bracket: "
View Full Code Here

Examples of org.languagetool.MultiThreadedJLanguageTool.check()

      int endIndex = Math.min(beginIndex + MAX_TEXT_LENGTH, text.length()-1);
      String subText = text.substring(beginIndex, endIndex);
      long startTime = System.currentTimeMillis();
      JLanguageTool langTool = new MultiThreadedJLanguageTool(language);
      langTool.activateDefaultPatternRules();
      List<RuleMatch> matches = langTool.check(subText);
      long runTime = System.currentTimeMillis() - startTime;
      if (i >= SKIP) {
        totalTime += runTime;
        System.out.println("Time: " + runTime + "ms (" + matches.size() + " matches)");
      } else {
View Full Code Here

Examples of org.mockito.internal.verification.checkers.AtLeastXNumberOfInvocationsChecker.check()

        AtLeastXNumberOfInvocationsChecker numberOfInvocations = new AtLeastXNumberOfInvocationsChecker();
       
        if (wantedCount == 1) {
            missingInvocation.check(data.getAllInvocations(), data.getWanted());
        }
        numberOfInvocations.check(data.getAllInvocations(), data.getWanted(), wantedCount);
    }
   
    public void verifyInOrder(VerificationDataInOrder data) {
        List<Invocation> allInvocations = data.getAllInvocations();
        InvocationMatcher wanted = data.getWanted();
View Full Code Here

Examples of org.mockito.internal.verification.checkers.AtLeastXNumberOfInvocationsInOrderChecker.check()

       
        if (wantedCount == 1) {
            missingInvocation.check(allInvocations, wanted, this, data.getOrderingContext());
        }
       
        numberOfCalls.check(allInvocations, wanted, wantedCount);
    }

    @Override
    public String toString() {
        return "Wanted invocations count: at least " + wantedCount;
View Full Code Here

Examples of org.mockito.internal.verification.checkers.MissingInvocationChecker.check()

    public void verify(VerificationData data) {
        MissingInvocationChecker missingInvocation = new MissingInvocationChecker();
        AtLeastXNumberOfInvocationsChecker numberOfInvocations = new AtLeastXNumberOfInvocationsChecker();
       
        if (wantedCount == 1) {
            missingInvocation.check(data.getAllInvocations(), data.getWanted());
        }
        numberOfInvocations.check(data.getAllInvocations(), data.getWanted(), wantedCount);
    }
   
    public void verifyInOrder(VerificationDataInOrder data) {
View Full Code Here

Examples of org.mockito.internal.verification.checkers.MissingInvocationInOrderChecker.check()

       
        MissingInvocationInOrderChecker missingInvocation = new MissingInvocationInOrderChecker();
        AtLeastXNumberOfInvocationsInOrderChecker numberOfCalls = new AtLeastXNumberOfInvocationsInOrderChecker(data.getOrderingContext());
       
        if (wantedCount == 1) {
            missingInvocation.check(allInvocations, wanted, this, data.getOrderingContext());
        }
       
        numberOfCalls.check(allInvocations, wanted, wantedCount);
    }
View Full Code Here

Examples of org.mockito.internal.verification.checkers.NumberOfInvocationsChecker.check()

        if (wantedCount > 0) {
            MissingInvocationChecker missingInvocation = new MissingInvocationChecker();
            missingInvocation.check(data.getAllInvocations(), data.getWanted());
        }
        NumberOfInvocationsChecker numberOfInvocations = new NumberOfInvocationsChecker();
        numberOfInvocations.check(data.getAllInvocations(), data.getWanted(), wantedCount);
    }
   
    public void verifyInOrder(VerificationDataInOrder data) {
        List<Invocation> allInvocations = data.getAllInvocations();
        InvocationMatcher wanted = data.getWanted();
View Full Code Here

Examples of org.mockito.internal.verification.checkers.NumberOfInvocationsInOrderChecker.check()

        if (wantedCount > 0) {
            MissingInvocationInOrderChecker missingInvocation = new MissingInvocationInOrderChecker();
            missingInvocation.check(allInvocations, wanted, this, data.getOrderingContext());
        }
        NumberOfInvocationsInOrderChecker numberOfCalls = new NumberOfInvocationsInOrderChecker();
        numberOfCalls.check(allInvocations, wanted, wantedCount, data.getOrderingContext());
    }   
   
    @Override
    public String toString() {
        return "Wanted invocations count: " + wantedCount;
View Full Code Here

Examples of org.mule.tck.probe.PollingProber.check()

        mc.dispatch("vm://in5", "test", null);

        assertExceptionMessage(mc.request("vm://out5", FunctionalTestCase.RECEIVE_TIMEOUT));

        Prober prober = new PollingProber(5000, 100);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                return !service.isStarted();
            }
View Full Code Here

Examples of org.mule.tck.probe.Prober.check()

        mc.dispatch("vm://in5", "test", null);

        assertExceptionMessage(mc.request("vm://out5", FunctionalTestCase.RECEIVE_TIMEOUT));

        Prober prober = new PollingProber(5000, 100);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                return !service.isStarted();
            }
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.