Package mockit

Class ExpectationsForConstructorsTest

java.lang.Object
mockit.ExpectationsForConstructorsTest

public final class ExpectationsForConstructorsTest extends Object
The Class ExpectationsForConstructorsTest.
  • Constructor Details

    • ExpectationsForConstructorsTest

      public ExpectationsForConstructorsTest()
  • Method Details

    • mockAllConstructors

      public void mockAllConstructors(mockit.ExpectationsForConstructorsTest.Collaborator unused)
      Mock all constructors.
      Parameters:
      unused - the unused
    • mockClassHierarchyWhereFirstConstructorInBaseClassIsPrivate

      public void mockClassHierarchyWhereFirstConstructorInBaseClassIsPrivate(mockit.ExpectationsForConstructorsTest.B mock)
      Mock class hierarchy where first constructor in base class is private.
      Parameters:
      mock - the mock
    • mockClassHierarchyWhereFirstConstructorInBaseClassOnAnotherPackageIsPackagePrivate

      public void mockClassHierarchyWhereFirstConstructorInBaseClassOnAnotherPackageIsPackagePrivate(mockit.ExpectationsForConstructorsTest.D mock)
      Mock class hierarchy where first constructor in base class on another package is package private.
      Parameters:
      mock - the mock
    • recordAndReplayBaseConstructorInvocation

      public void recordAndReplayBaseConstructorInvocation(mockit.ExpectationsForConstructorsTest.Base mocked)
      Record and replay base constructor invocation.
      Parameters:
      mocked - the mocked
    • recordExpectationOnBaseConstructorAndReplayWithCallToSuper

      public void recordExpectationOnBaseConstructorAndReplayWithCallToSuper(mockit.ExpectationsForConstructorsTest.Base mocked)
      Record expectation on base constructor and replay with call to super.
      Parameters:
      mocked - the mocked
    • verifyExpectationOnBaseConstructorReplayedWithCallToSuper

      public void verifyExpectationOnBaseConstructorReplayedWithCallToSuper(mockit.ExpectationsForConstructorsTest.Base mocked)
      Verify expectation on base constructor replayed with call to super.
      Parameters:
      mocked - the mocked
    • mockConstructorWhichCallsTwoOthersOfTheSameClass

      public void mockConstructorWhichCallsTwoOthersOfTheSameClass(mockit.ExpectationsForConstructorsTest.Collaborator2 mock)
      Mock constructor which calls two others of the same class.
      Parameters:
      mock - the mock