Search in sources :

Example 1 with DummyVerificationMode

use of org.mockito.internal.verification.DummyVerificationMode in project mockito by mockito.

the class VerificationWithAfterTest method should_return_formatted_output_from_toString_using_wrapped_verification_mode.

@Test
public void should_return_formatted_output_from_toString_using_wrapped_verification_mode() {
    org.mockito.verification.After after = new org.mockito.verification.After(10, new DummyVerificationMode());
    assertThat(after).hasToString("Wanted after 10 ms: [Dummy verification mode]");
}
Also used : After(org.junit.After) DummyVerificationMode(org.mockito.internal.verification.DummyVerificationMode) Test(org.junit.Test)

Example 2 with DummyVerificationMode

use of org.mockito.internal.verification.DummyVerificationMode in project mockito by mockito.

the class VerificationWithTimeoutTest method should_return_formatted_output_from_toString_using_wrapped_verification_mode.

@Test
public void should_return_formatted_output_from_toString_using_wrapped_verification_mode() {
    VerificationMode timeoutAndAtLeastOnce = new Timeout(9, new DummyVerificationMode());
    assertThat(timeoutAndAtLeastOnce).hasToString("Wanted after at most 9 ms: [Dummy verification mode]");
}
Also used : Timeout(org.mockito.verification.Timeout) DummyVerificationMode(org.mockito.internal.verification.DummyVerificationMode) VerificationMode(org.mockito.verification.VerificationMode) DummyVerificationMode(org.mockito.internal.verification.DummyVerificationMode) Test(org.junit.Test)

Example 3 with DummyVerificationMode

use of org.mockito.internal.verification.DummyVerificationMode in project mockito by mockito.

the class ThreadSafeMockingProgressTest method shouldShareState.

@Test
public void shouldShareState() throws Exception {
    // given
    MockingProgress p = mockingProgress();
    p.verificationStarted(new DummyVerificationMode());
    // then
    p = mockingProgress();
    assertNotNull(p.pullVerificationMode());
}
Also used : DummyVerificationMode(org.mockito.internal.verification.DummyVerificationMode) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)3 DummyVerificationMode (org.mockito.internal.verification.DummyVerificationMode)3 After (org.junit.After)1 Timeout (org.mockito.verification.Timeout)1 VerificationMode (org.mockito.verification.VerificationMode)1