Class MockedConstructionImpl<T>

java.lang.Object
org.mockito.internal.MockedConstructionImpl<T>
All Implemented Interfaces:
AutoCloseable, MockedConstruction<T>, ScopedMock

public final class MockedConstructionImpl<T> extends Object implements MockedConstruction<T>
  • Constructor Details

  • Method Details

    • constructed

      public List<T> constructed()
      Description copied from interface: MockedConstruction
      Get the constructed mocks.
      Specified by:
      constructed in interface MockedConstruction<T>
      Returns:
      the constructed mocks.
    • isClosed

      public boolean isClosed()
      Description copied from interface: ScopedMock
      Checks if this mock is closed.
      Specified by:
      isClosed in interface ScopedMock
      Returns:
      true if this mock is closed.
    • close

      public void close()
      Description copied from interface: ScopedMock
      Closes this scoped mock and throws an exception if already closed.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface ScopedMock
    • closeOnDemand

      public void closeOnDemand()
      Description copied from interface: ScopedMock
      Releases this scoped mock and is non-operational if already released.
      Specified by:
      closeOnDemand in interface ScopedMock