Class DefaultStubbingLookupListener

  • All Implemented Interfaces:
    java.io.Serializable, StubbingLookupListener

    class DefaultStubbingLookupListener
    extends java.lang.Object
    implements StubbingLookupListener, java.io.Serializable
    Default implementation of stubbing lookup listener. Fails early if stub called with unexpected arguments, but only if current strictness is set to STRICT_STUBS.
    • Field Detail

      • currentStrictness

        private Strictness currentStrictness
      • mismatchesReported

        private boolean mismatchesReported
    • Constructor Detail

      • DefaultStubbingLookupListener

        DefaultStubbingLookupListener​(Strictness strictness)
    • Method Detail

      • potentialArgMismatches

        private static java.util.List<Invocation> potentialArgMismatches​(Invocation invocation,
                                                                         java.util.Collection<Stubbing> stubbings)
      • setCurrentStrictness

        void setCurrentStrictness​(Strictness currentStrictness)
        Enables resetting the strictness to desired level
      • isMismatchesReported

        boolean isMismatchesReported()
        Indicates that stubbing argument mismatch was reported