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

Bertrand Dechoux edited comment on MRUNIT-138 at 8/13/12 10:59 PM:
-------------------------------------------------------------------

It would be interesting to see an example justifying the need to reuse a driver 
instance.

I am instantiating a distinct driver for each of my test method.
I use a junit @Before so that I get a fresh driver for each test while having 
no code duplication for the instantiation of the driver.
I would assume that with any decent test library you could do the same.

I may not see all the use cases. So, could we have examples of why someone 
would want to reuse the same driver instance?


                
      was (Author: bdechoux):
    It would be interesting to see an example justifying the need to reuse a 
driver instance.

I am instantiating a distinct driver for each of my test method.
I use a junit @Before so that I get a fresh driver for each test while having 
no code duplication for the instantiation of the driver.
I would assume that any decent test library you could do the same.

I may not see all the use cases. So, could we have examples of why someone 
would want to reuse the same driver instance?


                  
> Multiple calls to withInput should be supported
> -----------------------------------------------
>
>                 Key: MRUNIT-138
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-138
>             Project: MRUnit
>          Issue Type: Improvement
>    Affects Versions: 1.0.0
>            Reporter: Dave Beech
>
> As multiple key/val pairs are now supported for tests following MRUNIT-64, it 
> feels to me that I should be able to call withInput multiple times in 
> sequence in the same way I would usually call withOutput. This doesn't work 
> because of the way the deprecation of the old code has been handled. 
> Here's a unit test I think should pass:
> (from TestMapDriver - mapper is IdentityMapper)
>   @Test
>   public void testMultipleWithInput() throws IOException {
>     driver.withInput(new Text("foo"), new Text("bar"))
>       .withInput(new Text("bar"), new Text("baz"))
>       .withOutput(new Text("foo"), new Text("bar"))
>       .withOutput(new Text("bar"), new Text("baz"))
>       .runTest(false);
>   }

--
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