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
Hi,
I would test that the interface is not null.
And that the functionality of the class (via interface) is correct.
As for class inheritance, you should only expose constructors in the base
class, and any additional constructors that require additional information.
Passing a magic number
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
There are also some typos in those 12 pages. I always have a number of people
proof read my CV to fix such things.
I'll point them out when I see you at work tomorrow ;)
Steve.
-Original Message-
From: Heinrich Breedt [heinrichbre...@gmail.com]
Date: 06/01/2011 03:05 PM
To: ozDotNet
The technique that I've used in the past for this is to have a dictionary of
delegates for each type. Then I define a static variable to hold them - or use
DI to inject them.
private static DictionaryType, Delegate _parsers = new DictionaryType,
Delegate()
{
{ typeof(int), (Funcstring,
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
On Fri, Jun 3, 2011 at 5:10 PM, Greg Keogh g...@mira.net wrote:
Subversion. That way I get a change history as well.
*Danger Will Robinson*! A version control system is not a backup.
Greg
Why? It's on a server on the other side of the world. The dudes that
control it run backups of
On Fri, Jun 3, 2011 at 5:20 PM, Greg Keogh g...@mira.net wrote:
Bec, don't rely on memory sticks. I bought a 16GB stick at the swap-meet a
few weeks ago and one morning when I put it in I was asked for format it. I
brushed this off as a coincidence, so I formatted and it work fine to
another
On Sat, Jun 4, 2011 at 11:06 PM, Greg Keogh g...@mira.net wrote:
*Danger Will Robinson*! A version control system is not a backup.
That seems like a strange statement. Surely it depends what you're
backing up.
Strange arguably, but no: who backs up the version control files?
Version
On Sat, Jun 4, 2011 at 11:19 PM, Greg Keogh g...@mira.net wrote:
I try to keep it simple. I use the old XCopy to copy what is important to
external hard drives (2 Copies) and keeping it safe.
Don’t use xcopy, use robocopy.
SERIOUS WARNING:
My wife ran a batch file I created for her
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
If there's a hole in my argument I need to know.
Well, it seems clear to me that a version control system is written
specifically for that purpose, and a backup system for that specific purpose
(unless the designers and authors of the system have made some political
statement about
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.)
On Mon, Jun 6, 2011 at 1:05 PM, Greg Keogh g...@mira.net wrote:
If there's a hole in my argument I need to know.
Well, it seems clear to me that a version control system is written
specifically for that purpose, and a backup system for that specific purpose
(unless the designers and
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
Yeah I wouldn't use source control for backups.
I remember some years ago I was using svn for my graphics... Some of
the photoshop files were a few hundred meg in size (some as much as a
gig) and I discovered svn hides all this stuff in hidden .svn folders.
I ran out of space so fast I abandoned
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
22 matches
Mail list logo