Class MockScanner


  • public class MockScanner
    extends java.lang.Object
    Scan mocks, and prepare them if needed.
    • Constructor Summary

      Constructors 
      Constructor Description
      MockScanner​(java.lang.Object instance, java.lang.Class<?> clazz)
      Creates a MockScanner.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPreparedMocks​(java.util.Set<java.lang.Object> mocks)
      Add the scanned and prepared mock instance to the given collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MockScanner

        public MockScanner​(java.lang.Object instance,
                           java.lang.Class<?> clazz)
        Creates a MockScanner.
        Parameters:
        instance - The test instance
        clazz - The class in the type hierarchy of this instance.
    • Method Detail

      • addPreparedMocks

        public void addPreparedMocks​(java.util.Set<java.lang.Object> mocks)
        Add the scanned and prepared mock instance to the given collection.

        The preparation of mocks consists only in defining a MockName if not already set.

        Parameters:
        mocks - Set of mocks