Examples of Invocation


Examples of org.mockito.internal.invocation.Invocation

    }
   
    public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
        if (mockitoStubber.hasAnswersForStubbing()) {
            //stubbing voids in the old-school way: stubVoid()
            Invocation invocation = new Invocation(proxy, method, args, mockingProgress.nextSequenceNumber());
            InvocationMatcher invocationMatcher = matchersBinder.bindMatchers(invocation);
            mockitoStubber.setMethodForStubbing(invocationMatcher);
            return null;
        }
       
        VerificationModeImpl verificationMode = mockingProgress.pullVerificationMode();
        mockingProgress.validateState();

        Invocation invocation = new Invocation(proxy, method, args, mockingProgress.nextSequenceNumber());
        InvocationMatcher invocationMatcher = matchersBinder.bindMatchers(invocation);

        if (verificationMode != null) {
            //verifying
            verifyingRecorder.verify(invocationMatcher, verificationMode);
View Full Code Here

Examples of org.mockito.internal.invocation.Invocation

       
        if (!chunk.isEmpty()) {
            return;
        }
       
        Invocation previousInOrder = finder.findPreviousVerifiedInOrder(invocations);
        if (previousInOrder == null) {
            reporter.wantedButNotInvoked(wanted);
        } else {
            reporter.wantedButNotInvokedInOrder(wanted, previousInOrder, previousInOrder.getStackTrace());
        }
    }
View Full Code Here

Examples of org.mockito.internal.invocation.Invocation

        }
       
        List<Invocation> actualInvocations = finder.findInvocations(invocations, wanted, mode);
       
        if (actualInvocations.isEmpty()) {
            Invocation similar = finder.findSimilarInvocation(invocations, wanted, mode);
            reportMissingInvocationError(wanted, similar);
        }
    }
View Full Code Here

Examples of org.mockito.internal.invocation.Invocation

    public void verify(List<Invocation> invocations, InvocationMatcher wanted, VerificationModeImpl mode) {
        if (mode.explicitMode()) {
            return;
        }

        Invocation unverified = finder.findFirstUnverified(invocations);
        if (unverified != null) {
            reporter.noMoreInteractionsWanted(unverified, unverified.getStackTrace());
        }
    }
View Full Code Here

Examples of org.mockito.invocation.Invocation

    public void addConsecutiveAnswer(Answer answer) {
        addAnswer(answer, true);
    }

    public void addAnswer(Answer answer, boolean isConsecutive) {
        Invocation invocation = invocationForStubbing.getInvocation();
        mockingProgress.stubbingCompleted(invocation);
        AnswersValidator answersValidator = new AnswersValidator();
        answersValidator.validate(answer, invocation);

        synchronized (stubbed) {
View Full Code Here

Examples of org.radargun.stages.test.Invocation

      public Object run() throws RequestException {
         Object key = keyGenerator.generateKey(keySelector.next());
         Random random = stressor.getRandom();
         Operation operation = operationSelector.next(random);

         Invocation invocation;
         if (operation == BasicOperations.GET) {
            invocation = new Invocations.Get(cache, key);
            return stressor.makeRequest(invocation);
         } else if (operation == BasicOperations.PUT) {
            invocation = new Invocations.Put(cache, key, valueGenerator.generateValue(key, entrySize.next(random), random));
View Full Code Here

Examples of org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation

  private final CommandLineInvoker cli = new CommandLineInvoker();

  @Test
  public void hintProducesListOfValidCommands() throws IOException,
      InterruptedException {
    Invocation cli = this.cli.invoke("hint");
    assertThat(cli.await(), equalTo(0));
    assertThat(cli.getErrorOutput().length(), equalTo(0));
    assertThat(cli.getStandardOutputLines().size(), equalTo(10));
  }
View Full Code Here

Examples of wyvern.tools.typedAST.core.expressions.Invocation

  public static Object doInvoke(Obj receiver, String target, Object[] args) {
    Value arguments = toWyvObjs(args);
    return toJavaObject((
        new Application(
            new Invocation(receiver, target, null, FileLocation.UNKNOWN),
            arguments, FileLocation.UNKNOWN)
            .evaluate(Environment.getEmptyEnvironment())), null);//Therefore, can only handle strings and ints
  }
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.