History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UNI-145
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Tim Ducheyne
Reporter: Jim Hurne
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Unitils

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

Created: 29/May/09 01:32 AM   Updated: 06/Jun/09 10:12 AM
Component/s: mock
Affects Version/s: 2.2
Fix Version/s: 2.3

Environment: Eclipse 3.4


 Description  « Hide
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.

 All   Comments   Change History      Sort Order:
Tim Ducheyne - 29/May/09 07:25 AM
There is indeed a problem with the matcher position finder
when a method is put on more than 1 line.

I've fixed this last night. I'm going to do some extra testing but plan to release it this weekend.

grtz,
Tim

Jim Hurne - 06/Jun/09 10:12 AM
I've confirmed that ths is fixed in 2.3. Thanks for the quick turnaround!