1 /*
2 * MIT License
3 * Copyright (c) 2006-2025 JMockit developers
4 * See LICENSE file for full license text.
5 */
6 package mockit;
7
8 /**
9 * Same as {@link Verifications}, but checking that invocations from code under test occur in the same order as the
10 * verified expectations.
11 *
12 * <pre>{@code
13 * // Exercise tested code.
14 * codeUnderTest.doSomething();
15 *
16 * // Now verify that the expected invocations occurred in a given order.
17 * new VerificationsInOrder() {{
18 * <strong>mock1</strong>.firstExpectedMethod(anyInt); minTimes = 1;
19 * <strong>mock2</strong>.secondExpectedMethod(1, "test"); maxTimes = 2;
20 * <strong>MockedClass</strong>.finalMethod(anyString);
21 * }};
22 * }</pre>
23 *
24 * @see #VerificationsInOrder()
25 * @see <a href="http://jmockit.github.io/tutorial/Mocking.html#verificationInOrder" target="tutorial">Tutorial</a>
26 */
27 public class VerificationsInOrder extends Verifications {
28 /**
29 * Begins <em>in-order</em> verification on the mocked types/instances that were invoked while executing code under
30 * test.
31 */
32 protected VerificationsInOrder() {
33 super(true, (Object[]) null);
34 }
35 }