You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Peter Hancock <pe...@gmail.com> on 2011/10/13 17:38:46 UTC

[VOTE] to include the Mockito framework

I would like to launch a vote to include the Mockito framework and her
dependencies in to FOP for unit testing.

Some reasons for introducing a framework for mocking and stubbing, and
Mockito in particular, have briefly been expressed [1] and patches
have been provided [2] ... [4] that depend upon Mockito.

Unit testing in FOP often proves difficult because it can be very hard
to factor out dependencies: to run a piece of FOP code often requires
substantial configuration.
Mockito can go a long way in helping us here, and may even encourage
us to write more unit tests!

[1] http://markmail.org/message/zobrtzanojpkfysa
[2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50483
[3] https://issues.apache.org/bugzilla/show_bug.cgi?id=50391
[4] https://issues.apache.org/bugzilla/show_bug.cgi?id=46962

+1 here.

Peter

Re: [VOTE] to include the Mockito framework

Posted by Simon Pepping <sp...@leverkruid.eu>.
I understand that Mockito facilitates true unit testing of specific
pieces of code. That is a good facility to have.

+1

Simon

On Thu, Oct 13, 2011 at 04:38:46PM +0100, Peter Hancock wrote:
> I would like to launch a vote to include the Mockito framework and her
> dependencies in to FOP for unit testing.
> 
> Some reasons for introducing a framework for mocking and stubbing, and
> Mockito in particular, have briefly been expressed [1] and patches
> have been provided [2] ... [4] that depend upon Mockito.
> 
> Unit testing in FOP often proves difficult because it can be very hard
> to factor out dependencies: to run a piece of FOP code often requires
> substantial configuration.
> Mockito can go a long way in helping us here, and may even encourage
> us to write more unit tests!
> 
> [1] http://markmail.org/message/zobrtzanojpkfysa
> [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50483
> [3] https://issues.apache.org/bugzilla/show_bug.cgi?id=50391
> [4] https://issues.apache.org/bugzilla/show_bug.cgi?id=46962
> 
> +1 here.
> 
> Peter

Re: [VOTE] to include the Mockito framework

Posted by Vincent Hennebert <vh...@gmail.com>.
Having recently played with Mockito myself I can see the benefits it
brings. It would allow us to write more unit tests more easily, and make
them more maintainable.

+1

Vincent


On 13/10/11 16:38, Peter Hancock wrote:
> I would like to launch a vote to include the Mockito framework and her
> dependencies in to FOP for unit testing.
> 
> Some reasons for introducing a framework for mocking and stubbing, and
> Mockito in particular, have briefly been expressed [1] and patches
> have been provided [2] ... [4] that depend upon Mockito.
> 
> Unit testing in FOP often proves difficult because it can be very hard
> to factor out dependencies: to run a piece of FOP code often requires
> substantial configuration.
> Mockito can go a long way in helping us here, and may even encourage
> us to write more unit tests!
> 
> [1] http://markmail.org/message/zobrtzanojpkfysa
> [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50483
> [3] https://issues.apache.org/bugzilla/show_bug.cgi?id=50391
> [4] https://issues.apache.org/bugzilla/show_bug.cgi?id=46962
> 
> +1 here.
> 
> Peter

Re: [VOTE] to include the Mockito framework

Posted by Peter Hancock <pe...@gmail.com>.
> could you describe the process you would like to see happen for
> incorporating the use of Mockito into fop?

>From a project setup point of view we just need 3 new jars in
lib/build and an addition to the relevant classpath properties in
build.xml.

In terms of usage it is not a disruptive tool:  I referred to it as a
framework, but in fact it is a library and totally optional.
Usage examples can be found at
http://docs.mockito.googlecode.com/hg/org/mockito/Mockito.html

Peter

Re: [VOTE] to include the Mockito framework

Posted by Glenn Adams <gl...@skynav.com>.
could you describe the process you would like to see happen for
incorporating the use of mockito into fop?

On Thu, Oct 13, 2011 at 11:38 PM, Peter Hancock <pe...@gmail.com>wrote:

> I would like to launch a vote to include the Mockito framework and her
> dependencies in to FOP for unit testing.
>
> Some reasons for introducing a framework for mocking and stubbing, and
> Mockito in particular, have briefly been expressed [1] and patches
> have been provided [2] ... [4] that depend upon Mockito.
>
> Unit testing in FOP often proves difficult because it can be very hard
> to factor out dependencies: to run a piece of FOP code often requires
> substantial configuration.
> Mockito can go a long way in helping us here, and may even encourage
> us to write more unit tests!
>
> [1] http://markmail.org/message/zobrtzanojpkfysa
> [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50483
> [3] https://issues.apache.org/bugzilla/show_bug.cgi?id=50391
> [4] https://issues.apache.org/bugzilla/show_bug.cgi?id=46962
>
> +1 here.
>
> Peter
>

Re: [VOTE] to include the Mockito framework

Posted by Peter Hancock <pe...@gmail.com>.
6 +1 votes and Mockito has has been accepted.

Peter

On Mon, Oct 17, 2011 at 2:51 PM, Pascal Sancho <pa...@takoma.fr> wrote:
> Hi,
>
> +1 for me
>
> Le 17/10/2011 15:06, Clay Leeds a écrit :
>> I'll belly up to the bar and have a Mockito as well... ;-)
>>
>> +1
>>
>> Sent from my iPhone
>>
>> On Oct 13, 2011, at 8:38 AM, Peter Hancock <pe...@gmail.com> wrote:
>>
>>> I would like to launch a vote to include the Mockito framework and her
>>> dependencies in to FOP for unit testing.
>>>
>>> Some reasons for introducing a framework for mocking and stubbing, and
>>> Mockito in particular, have briefly been expressed [1] and patches
>>> have been provided [2] ... [4] that depend upon Mockito.
>>>
>>> Unit testing in FOP often proves difficult because it can be very hard
>>> to factor out dependencies: to run a piece of FOP code often requires
>>> substantial configuration.
>>> Mockito can go a long way in helping us here, and may even encourage
>>> us to write more unit tests!
>>>
>>> [1] http://markmail.org/message/zobrtzanojpkfysa
>>> [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50483
>>> [3] https://issues.apache.org/bugzilla/show_bug.cgi?id=50391
>>> [4] https://issues.apache.org/bugzilla/show_bug.cgi?id=46962
>>>
>>> +1 here.
>>>
>>> Peter
>>
>
> --
> Pascal
>

Re: [VOTE] to include the Mockito framework

Posted by Pascal Sancho <pa...@takoma.fr>.
Hi,

+1 for me

Le 17/10/2011 15:06, Clay Leeds a écrit :
> I'll belly up to the bar and have a Mockito as well... ;-)
> 
> +1
> 
> Sent from my iPhone
> 
> On Oct 13, 2011, at 8:38 AM, Peter Hancock <pe...@gmail.com> wrote:
> 
>> I would like to launch a vote to include the Mockito framework and her
>> dependencies in to FOP for unit testing.
>>
>> Some reasons for introducing a framework for mocking and stubbing, and
>> Mockito in particular, have briefly been expressed [1] and patches
>> have been provided [2] ... [4] that depend upon Mockito.
>>
>> Unit testing in FOP often proves difficult because it can be very hard
>> to factor out dependencies: to run a piece of FOP code often requires
>> substantial configuration.
>> Mockito can go a long way in helping us here, and may even encourage
>> us to write more unit tests!
>>
>> [1] http://markmail.org/message/zobrtzanojpkfysa
>> [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50483
>> [3] https://issues.apache.org/bugzilla/show_bug.cgi?id=50391
>> [4] https://issues.apache.org/bugzilla/show_bug.cgi?id=46962
>>
>> +1 here.
>>
>> Peter
> 

-- 
Pascal

Re: [VOTE] to include the Mockito framework

Posted by Clay Leeds <th...@gmail.com>.
I'll belly up to the bar and have a Mockito as well... ;-)

+1

Sent from my iPhone

On Oct 13, 2011, at 8:38 AM, Peter Hancock <pe...@gmail.com> wrote:

> I would like to launch a vote to include the Mockito framework and her
> dependencies in to FOP for unit testing.
> 
> Some reasons for introducing a framework for mocking and stubbing, and
> Mockito in particular, have briefly been expressed [1] and patches
> have been provided [2] ... [4] that depend upon Mockito.
> 
> Unit testing in FOP often proves difficult because it can be very hard
> to factor out dependencies: to run a piece of FOP code often requires
> substantial configuration.
> Mockito can go a long way in helping us here, and may even encourage
> us to write more unit tests!
> 
> [1] http://markmail.org/message/zobrtzanojpkfysa
> [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50483
> [3] https://issues.apache.org/bugzilla/show_bug.cgi?id=50391
> [4] https://issues.apache.org/bugzilla/show_bug.cgi?id=46962
> 
> +1 here.
> 
> Peter

Re: [VOTE] to include the Mockito framework

Posted by Chris Bowditch <bo...@hotmail.com>.
On 13/10/2011 16:38, Peter Hancock wrote:

Hi Peter,

> I would like to launch a vote to include the Mockito framework and her
> dependencies in to FOP for unit testing.

Me too. After all Mockito is only needed for build purposes not runtime.

  +1

Chris

> Some reasons for introducing a framework for mocking and stubbing, and
> Mockito in particular, have briefly been expressed [1] and patches
> have been provided [2] ... [4] that depend upon Mockito.
>
> Unit testing in FOP often proves difficult because it can be very hard
> to factor out dependencies: to run a piece of FOP code often requires
> substantial configuration.
> Mockito can go a long way in helping us here, and may even encourage
> us to write more unit tests!
>
> [1] http://markmail.org/message/zobrtzanojpkfysa
> [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50483
> [3] https://issues.apache.org/bugzilla/show_bug.cgi?id=50391
> [4] https://issues.apache.org/bugzilla/show_bug.cgi?id=46962
>
> +1 here.
>
> Peter
>
>