[ 
https://issues.apache.org/jira/browse/MRUNIT-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13423739#comment-13423739
 ] 

Bertrand Dechoux commented on MRUNIT-119:
-----------------------------------------

> I know that withCounter does this in TestDriver but withStrictCounterChecking 
> in TestDriver does not need to return this because nothing uses its return 
> value, it should probably also be protected since no user needs to call it.
Both methods have exactly the same use. And it is true that the return value is 
never used.

However, we really want in inheritance in order to share the documentation and 
to ensure that all classes extending TestDriver have those methods.
The only drawback with the current implementations is that we can not guarantee 
that all classes extending TestDriver will overwrite the default implementation 
in order to return a more specific return type : their own type.

The only clean way to do it would be to remove the default implementation in 
TestDriver (ie the method should be protected with a different name and no 
return value) and create an interface with the declaration of this method which 
should be 'implemented' by the abstract TestDriver. And so every classes 
extending TestDriver would need to define a correct implementation in order to 
compile.

But I guess this change would not be only related to those two methods. And 
that would be a refactoring which really should not be done by MRUNIT-19.

> validateExpectedAgainstActual should be private, only TestDriver uses it
Done. I will attach the patch again once we reach a conclusion on the first 
point.

> Good work, thanks for your contribution and sorry about out slow response, we 
> look forward to more of our your contributions.
Nothing to be sorry about. I was only afraid that the notification saying that 
I had attached a new patch might have been lost.
                
> Counter tests should support assertions that counters are not present
> ---------------------------------------------------------------------
>
>                 Key: MRUNIT-119
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-119
>             Project: MRUnit
>          Issue Type: Improvement
>    Affects Versions: 1.0.0
>            Reporter: Dave Beech
>            Assignee: Bertrand Dechoux
>            Priority: Minor
>         Attachments: mrunit-119-proposal.diff, mrunit-119-proposal.diff
>
>
> From Bertrand Dechoux via user mailing list.
> Should we add a feature to the counter checking feature so that users can 
> assert that something will *not* be present, for example an error or 
> exception counter, and have the test fail if it is set?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to