Yeah...
I think the problem is that all the tests were done on the base class and
none on the actual class.
But there shouldn't have even been a base/sub class pair.
There was only one class, and the author then proceeded to split it into 2
justifying the decision by saying that he needed one for
Tristan Reeves wrote:
Hi list,
I'll describe the situation in as little detail as possible.
There's some code in which a class BaseClass, and a class ClassForUse
: BaseClass are defined.
BaseClass is used in a unit test that calls its constructor with mocks.
ClassForUse is used in production
-To: ozDotNet ozdotnet@ozdotnet.com
Subject: unit testing gone mad
Hi list,
I'll describe the situation in as little detail as possible.
There's some code in which a class BaseClass, and a class ClassForUse :
BaseClass are defined.
BaseClass is used in a unit test that calls its constructor with mocks
There's a lot of opinion and not much science with TDD. I'd be sceptical of
someone who introduced themselves as a TDD ninja. It takes an enormous
amount of practice to develop expertise (5,000 hours) so almost everyone is
a beginner. Read Kent Beck and Uncle Bob on what they think is best to
Many thanks to all respondents. There's something there for me to mull over.
Regards,
Tristan.
On Sun, Jun 5, 2011 at 8:03 PM, Mark Ryall mark.ry...@gmail.com wrote:
There's a lot of opinion and not much science with TDD. I'd be sceptical
of someone who introduced themselves as a TDD ninja.
Just wondering, what is the name of the test?
On Jun 5, 2011 5:06 PM, Tristan Reeves tree...@gmail.com wrote:
Hi list,
I'll describe the situation in as little detail as possible.
There's some code in which a class BaseClass, and a class ClassForUse :
BaseClass are defined.
BaseClass is
On Sun, Jun 5, 2011 at 5:06 PM, Tristan Reeves tree...@gmail.com wrote:
Hi list,
I'll describe the situation in as little detail as possible.
There's some code in which a class BaseClass, and a class ClassForUse :
BaseClass are defined.
BaseClass is used in a unit test that calls its
ClassForUseInheritsBaseClass
On Mon, Jun 6, 2011 at 6:22 AM, Heinrich Breedt heinrichbre...@gmail.comwrote:
Just wondering, what is the name of the test?
On Jun 5, 2011 5:06 PM, Tristan Reeves tree...@gmail.com wrote:
Hi list,
I'll describe the situation in as little detail as possible.
As an exercise, try making the method name articulate what you are testing.
Use underscore for space. Don't be afraid to use longish sentence
On Jun 6, 2011 12:32 PM, Tristan Reeves tree...@gmail.com wrote:
ClassForUseInheritsBaseClass
On Mon, Jun 6, 2011 at 6:22 AM, Heinrich Breedt
I wouldn't be writing these tests just for themselves, but they do
check if someone attempts to change the base class without knowing
what is going on. Similarly for the member tests.
If these were perhaps created automatically, that would be OK, just.
--
Regards,
Mark Hurd, B.Sc.(Ma.)(Hons.)
I follow the suggested naming from The Art of Unit testing by Roy Osherove.
MethodBeingTested_Inputs_ExpectedResult
ie:
Constructor_PassInDependencies_IsNotNull
CreateInstance_PassValidJobId_CreatesInstance
or whatever. I just make it up as I go along, but by following the
three part template
The biggest benefit of proper test naming is that it forces you to think
what you are testing. IMHO of course.
Resharper allows you to have multiple naming styles.
On Jun 6, 2011 1:35 PM, Stephen Price step...@littlevoices.com wrote:
I follow the suggested naming from The Art of Unit testing by
Hi Tristan, I would argue that this sort of testing is a natural part of
TDD. It seems as though the author is testing HOW the class is
implemented, not that the class implements the functionality that it was
created to perform. At some point you have to trust your compiler, if you
derive one
I would argue that this sort of testing is a natural part of TDD
By this I mean that I believe it is NOT a natural part of TDD... just
realized this could be mis-interpreted.
On Mon, Jun 6, 2011 at 3:46 PM, Scott Baldwin carpenoctur...@gmail.comwrote:
Hi Tristan, I would argue that this sort of
14 matches
Mail list logo