All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fitbur.mockito.internal.invocation.InvocationMarker Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
/*
 * Copyright (c) 2007 Mockito contributors
 * This program is made available under the terms of the MIT License.
 */
package com.fitbur.mockito.internal.invocation;

import com.fitbur.mockito.internal.verification.api.InOrderContext;
import com.fitbur.mockito.invocation.Invocation;

import java.util.List;

public class InvocationMarker {

    private InvocationMarker(){}
	
    public static void markVerified(List invocations, CapturesArgumentsFromInvocation wanted) {
        for (Invocation invocation : invocations) {
            markVerified(invocation, wanted);
        }
    }

    public static void markVerified(Invocation invocation, CapturesArgumentsFromInvocation wanted) {
        invocation.markVerified();
        wanted.captureArgumentsFrom(invocation);
    }

    public static void markVerifiedInOrder(List chunk, CapturesArgumentsFromInvocation wanted, InOrderContext context) {
        markVerified(chunk, wanted);

        for (Invocation i : chunk) {
            context.markVerified(i);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy