jmockit / jmockit1

Advanced Java library for integration testing, mocking, faking, and code coverage
Other
465 stars 240 forks source link

Missing call verifyMissingInvocations #291

Closed wangjuns closed 8 years ago

wangjuns commented 8 years ago

Please provide the following information:

@Mock(minInvocations = x) is not working, I think blow code has bug at class mockit.internal.mockups.MockState

   boolean update()
   {
      if (proceedingInvocation != null) {
         MockInvocation invocation = proceedingInvocation.get();

         if (invocation != null && invocation.proceeding) {
            invocation.proceeding = false;
            return false;
         }
      }

      int timesInvoked;

      synchronized (invocationCountLock) {
         timesInvoked = ++invocationCount;
      }

      verifyUnexpectedInvocation(timesInvoked);
      return true;
   }

The code just call verifyUnexpectedInvocation(), but not verifyUnexpectedInvocation()

rliesenfeld commented 8 years ago

I would need to see an example test where it doesn't work. Can you provide that?