Uploaded image for project: 'Unitils'
  1. UNI-145

Argument matchers don't work if method call is on seperate line from the behavior declaration

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: mock
    • Labels:
      None
    • Environment:
      Eclipse 3.4
    • Sprint:

      Description

      When using Unitils with the Eclipse compiler, an "Unable to find indexes of argument matcher" exception is generated at runtime if the method call is on a different line from the behavior.
       
      For example, the following work fine (mockConverter is declared as Mock<Converter> mockConverter):
       
      mockConverter.returns(convertedDate).convertTo(utc);
      mockConverter.returns(convertedDate).convertTo(
      utc);
       
      But the following throws an exception:
       
      mockConverter.returns(convertedDate)
      .convertTo(utc);

      This appears to be a variant of UNI-105, where an exception was generated at runtime if the argument matchers don't appear on the same line as the method call.

        Attachments

          Activity

            People

            • Assignee:
              tim.ducheyne Tim Ducheyne
              Reporter:
              jedijim Jim Hurne
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: