private void registerReplacementInstanceIfApplicable(
      @Nullable Object mock, @Nonnull ExpectedInvocation invocation) {
    Object replacementInstance = invocation.replacementInstance;

    if (replacementInstance != null && replacementInstance != invocation.instance) {
      replacementMap.put(mock, replacementInstance);
    }
  }
 void registerRead() {
   int testId = TestRun.getTestId();
   testIdsToAssignments.put(testId, null);
   readCount++;
 }
Exemple #3
0
 public void addTransformedClass(
     @Nonnull ClassIdentification classId, @Nonnull byte[] pretransformClassfile) {
   transformedClasses.put(classId, pretransformClassfile);
 }
 void registerAssignment() {
   int testId = TestRun.getTestId();
   testIdsToAssignments.put(testId, Boolean.TRUE);
   writeCount++;
 }
Exemple #5
0
 public void registerInstanceFactoryForMockedType(
     @Nonnull Class<?> mockedType, @Nonnull InstanceFactory mockedInstanceFactory) {
   registerMockedClass(mockedType);
   mockedTypesAndInstances.put(mockedType, mockedInstanceFactory);
 }