Hi Adam, Thanks for the response. My answers to your questions below.
On 6 September 2011 21:13, Adam Nichols <[email protected]> wrote: > As far as I know, PDFBox only uses JUnit to keep the dependencies at a > minimum. Adding another library is a big deal, as it often causes > people to jump through many hoops at their company (tests, audits, > reconsidering alternatives, ripping out unnecessary dependencies so it > will work on Android and other devices with limited resources, etc.). > If it is a question of writing quality/ better code, then adding another library that supports the quality objective should not be a big deal. The last time I checked, the Apache Software Foundation was all about meritocracy. I believe that I am just doing my bit to uphold that value. > > Is there a specific reason you aren't just using JUnit to for the > automated testing? Mocking allows a developer to focus solely on the method under test, without having to deal with dependencies, like method calls to perform tasks that the method under test depends upon. This article illustrates the point very well: http://bit.ly/plFpQy > JUnit can accept any Java code in the tests, so it > should be possible to ensure that objects interact with each other as > expected without any problem. > If you have objects, i.e. instances of classes, interacting with each other in a test, then that is no longer a *unit test*. What you have then is an *integration test*. At this point in time, my primary concern is that the code that I submit to the PDFBox project has been *unit tested*. I want to be sure that the code that I write behaves as expected, especially if there is a likelihood that someone else adds to it, or makes changes to it... So please let me know. Thanks in advance, Rey Malahay > > On Tue, Sep 6, 2011 at 10:18 PM, rey malahay <[email protected]> wrote: > > Hi Guys, > > > > I am currently rounding off my work for submission. Please could you > advise > > me on what mocking framework is being used in conjunction with the unit > > tests for PDFBox? I am currently using Mockito. Is this acceptable? > > > > Please advise. > > > > Thanks in advance, > > Rey Malahay > > > > ---------- Forwarded message ---------- > > From: rey malahay <[email protected]> > > Date: 3 September 2011 15:02 > > Subject: Mocking Frameworks > > To: [email protected] > > > > > > Dear PDFBox Team, > > > > May I use a mocking framework in my unit tests? I am currently using > Mockito > > in conjunction with JUnit, to write my unit tests and mock classes that > do > > not form part of the test objective. If so, how do we include the > framework > > in question with our patch submission? > > > > Please advise. > > > > Thanks in advance, > > Rey Malahay > > > > -- > > My heroes are the ones who survived doing it wrong, who made mistakes, > but > > recovered from them. - Bono > > > > > > > > -- > > My heroes are the ones who survived doing it wrong, who made mistakes, > but > > recovered from them. - Bono > > > -- My heroes are the ones who survived doing it wrong, who made mistakes, but recovered from them. - Bono
