Home | History | Annotate | Download | only in internal
      1 /*
      2  * Copyright (c) 2007 Mockito contributors
      3  * This program is made available under the terms of the MIT License.
      4  */
      5 package org.mockito.internal;
      6 
      7 import org.junit.Test;
      8 import org.mockito.Mock;
      9 import org.mockito.internal.invocation.InvocationBuilder;
     10 import org.mockito.invocation.Invocation;
     11 import org.mockitousage.IMethods;
     12 import org.mockitoutil.TestBase;
     13 
     14 import static java.util.Collections.singletonList;
     15 import static junit.framework.TestCase.assertFalse;
     16 import static junit.framework.TestCase.assertTrue;
     17 
     18 @SuppressWarnings("unchecked")
     19 public class InOrderImplTest extends TestBase {
     20 
     21     @Mock IMethods mock;
     22 
     23     @Test
     24     public void shouldMarkVerifiedInOrder() throws Exception {
     25         //given
     26         InOrderImpl impl = new InOrderImpl(singletonList(mock));
     27         Invocation i = new InvocationBuilder().toInvocation();
     28         assertFalse(impl.isVerified(i));
     29 
     30         //when
     31         impl.markVerified(i);
     32 
     33         //then
     34         assertTrue(impl.isVerified(i));
     35     }
     36 }
     37