blob: fc48b4da4cd7a4933154a21aff98a475258c71dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.invocation;
import org.mockito.internal.verification.api.InOrderContext;
import org.mockito.invocation.Invocation;
import org.mockito.invocation.MatchableInvocation;
import java.util.List;
public class InvocationMarker {
private InvocationMarker(){}
public static void markVerified(List<Invocation> invocations, MatchableInvocation wanted) {
for (Invocation invocation : invocations) {
markVerified(invocation, wanted);
}
}
public static void markVerified(Invocation invocation, MatchableInvocation wanted) {
invocation.markVerified();
wanted.captureArgumentsFrom(invocation);
}
public static void markVerifiedInOrder(List<Invocation> chunk, MatchableInvocation wanted, InOrderContext context) {
markVerified(chunk, wanted);
for (Invocation i : chunk) {
context.markVerified(i);
}
}
}
|