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