Example #1
0
 @Override
 boolean isToExecuteRealObjectOverride(@Nonnull Object instance) {
   return !TestRun.getExecutingTest().isMockedInstance(instance);
 }
Example #2
0
 @Override
 boolean isToExecuteRealImplementation(@Nullable Object instance) {
   return instance == null || !TestRun.getExecutingTest().isMockedInstance(instance);
 }
Example #3
0
 @Override
 boolean isToExecuteRealImplementation(@Nullable Object instance) {
   return instance != null && !TestRun.mockFixture().isInstanceOfMockedClass(instance);
 }
Example #4
0
 @Override
 boolean isWithRealImplementation(@Nullable Object instance) {
   return instance == null || !TestRun.getExecutingTest().isInjectableMock(instance);
 }
Example #5
0
 private void discardStateForCorrespondingMockClassIfAny(@Nonnull Class<?> redefinedClass) {
   String mockClassesInternalNames = realClassesToMockClasses.remove(redefinedClass);
   TestRun.getMockStates().removeClassState(redefinedClass, mockClassesInternalNames);
 }