[
https://issues.apache.org/jira/browse/MRUNIT-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230389#comment-13230389
]
Jim Donofrio commented on MRUNIT-68:
------------------------------------
Overall the patch looks good except:
CounterWrapper should use private instance variables
CounterWrapper can use else statements in the findCounterValue methods, since
if one counters variable is null the other must not be
TestDriver's with methods dont need to return this, they should return void
since the calling methods wont use that result
TestDriver's validate should use fail(msg) not RuntimeException
You should use the ExpectedSuppliedException class in test mrunit to verify the
exception message returned
I think 0 would be a clearer default value
> Support custom counter checking
> -------------------------------
>
> Key: MRUNIT-68
> URL: https://issues.apache.org/jira/browse/MRUNIT-68
> Project: MRUnit
> Issue Type: New Feature
> Affects Versions: 0.8.1
> Reporter: Jarek Jarcec Cecho
> Fix For: 1.0.0
>
> Attachments: MRUNIT-68.patch, MRUNIT-68.patch, MRUNIT-68.patch
>
>
> It would be great if user could check custom counter values in addition to
> checking outputs. Let me show my idea on example, right now counters needs to
> be checked explicitly:
> assertEquals(2,
> mapDriver.getCounters().findCounter(CustomMapper.CustomCounter.NAME).getValue());
> It would be great if user could do something like:
> .withCounter(CustomMapper.CustomCounter.Name, 2)
--
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