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