org.mockito.internal.stubbing.StubbingComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockito-core Show documentation
Show all versions of mockito-core Show documentation
Mockito mock objects library core API and implementation
/*
* Copyright (c) 2016 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.stubbing;
import org.mockito.internal.invocation.InvocationComparator;
import org.mockito.stubbing.Stubbing;
import java.util.Comparator;
/**
* Compares stubbings based on {@link InvocationComparator}
*/
public class StubbingComparator implements Comparator {
private final InvocationComparator invocationComparator = new InvocationComparator();
public int compare(Stubbing o1, Stubbing o2) {
return invocationComparator.compare(o1.getInvocation(), o2.getInvocation());
}
}