Package mockit

Class MockInstanceMatchingTest

java.lang.Object
mockit.MockInstanceMatchingTest

public final class MockInstanceMatchingTest extends Object
The Class MockInstanceMatchingTest.
  • Field Details

    • thrown

      public final org.junit.rules.ExpectedException thrown
      The thrown.
  • Constructor Details

    • MockInstanceMatchingTest

      public MockInstanceMatchingTest()
  • Method Details

    • matchOnMockInstance

      public void matchOnMockInstance(mockit.MockInstanceMatchingTest.Collaborator otherInstance)
      Match on mock instance.
      Parameters:
      otherInstance - the other instance
    • recordOnMockInstanceButReplayOnDifferentInstance

      public void recordOnMockInstanceButReplayOnDifferentInstance(mockit.MockInstanceMatchingTest.Collaborator verifiedMock)
      Record on mock instance but replay on different instance.
      Parameters:
      verifiedMock - the verified mock
    • verifyExpectationMatchingOnMockInstance

      public void verifyExpectationMatchingOnMockInstance(mockit.MockInstanceMatchingTest.Collaborator verifiedMock)
      Verify expectation matching on mock instance.
      Parameters:
      verifiedMock - the verified mock
    • verifyExpectationsOnSameMethodCallForDifferentMockedInstances

      public void verifyExpectationsOnSameMethodCallForDifferentMockedInstances(mockit.MockInstanceMatchingTest.Collaborator verifiedMock)
      Verify expectations on same method call for different mocked instances.
      Parameters:
      verifiedMock - the verified mock
    • verifyOnMockInstanceButReplayOnDifferentInstance

      public void verifyOnMockInstanceButReplayOnDifferentInstance(mockit.MockInstanceMatchingTest.Collaborator verifiedMock)
      Verify on mock instance but replay on different instance.
      Parameters:
      verifiedMock - the verified mock
    • recordExpectationsMatchingOnMultipleMockInstances

      public void recordExpectationsMatchingOnMultipleMockInstances(mockit.MockInstanceMatchingTest.Collaborator mock2)
      Record expectations matching on multiple mock instances.
      Parameters:
      mock2 - the mock 2
    • recordOnSpecificMockInstancesButReplayOnDifferentOnes

      public void recordOnSpecificMockInstancesButReplayOnDifferentOnes(mockit.MockInstanceMatchingTest.Collaborator mock2)
      Record on specific mock instances but replay on different ones.
      Parameters:
      mock2 - the mock 2
    • verifyExpectationsMatchingOnMultipleMockInstances

      public void verifyExpectationsMatchingOnMultipleMockInstances(mockit.MockInstanceMatchingTest.Collaborator mock2)
      Verify expectations matching on multiple mock instances.
      Parameters:
      mock2 - the mock 2
    • verifyOnSpecificMockInstancesButReplayOnDifferentOnes

      public void verifyOnSpecificMockInstancesButReplayOnDifferentOnes(mockit.MockInstanceMatchingTest.Collaborator mock2)
      Verify on specific mock instances but replay on different ones.
      Parameters:
      mock2 - the mock 2
    • matchOnTwoMockInstances

      public void matchOnTwoMockInstances(mockit.MockInstanceMatchingTest.Collaborator mock2)
      Match on two mock instances.
      Parameters:
      mock2 - the mock 2
    • matchOnTwoMockInstancesAndReplayInDifferentOrder

      public void matchOnTwoMockInstancesAndReplayInDifferentOrder(mockit.MockInstanceMatchingTest.Collaborator mock2)
      Match on two mock instances and replay in different order.
      Parameters:
      mock2 - the mock 2
    • matchOnTwoMockInstancesForOtherwiseIdenticalExpectations

      public void matchOnTwoMockInstancesForOtherwiseIdenticalExpectations(mockit.MockInstanceMatchingTest.Collaborator mock2)
      Match on two mock instances for otherwise identical expectations.
      Parameters:
      mock2 - the mock 2
    • verifyExpectationsMatchingOnMultipleMockParametersButReplayedOutOfOrder

      public void verifyExpectationsMatchingOnMultipleMockParametersButReplayedOutOfOrder(AbstractExecutorService es1, AbstractExecutorService es2)
      Verify expectations matching on multiple mock parameters but replayed out of order.
      Parameters:
      es1 - the es 1
      es2 - the es 2
    • recordExpectationMatchingOnInstanceCreatedInsideCodeUnderTest

      public void recordExpectationMatchingOnInstanceCreatedInsideCodeUnderTest()
      Record expectation matching on instance created inside code under test.
    • recordExpectationsOnTwoInstancesOfSameMockedInterface

      public void recordExpectationsOnTwoInstancesOfSameMockedInterface(DataSource mockDS1, DataSource mockDS2, Attr n) throws Exception
      Record expectations on two instances of same mocked interface.
      Parameters:
      mockDS1 - the mock DS 1
      mockDS2 - the mock DS 2
      n - the n
      Throws:
      Exception - the exception
    • verifyingCallsOnSpecificInstancesOfDifferentSubclasses

      public void verifyingCallsOnSpecificInstancesOfDifferentSubclasses(mockit.MockInstanceMatchingTest.SubclassA anyA, mockit.MockInstanceMatchingTest.SubclassA a, mockit.MockInstanceMatchingTest.SubclassB anyB)
      Verifying calls on specific instances of different subclasses.
      Parameters:
      anyA - the any A
      a - the a
      anyB - the any B