Not necessarily. The extension could be defined in such as way that it  
turns into an external class. We just need to get away from the idea  
that one text file == one class.  One concept deals with byte storage,  
the other deals with compilation and logical units.  They really have  
nothing to do with each other except that it was historically  
convenient.

- J

On Sep 14, 2009, at 12:47 AM, Vince O'Sullivan wrote:

>
> On Sep 13, 10:20 pm, Joshua Marinacci <jos...@marinacci.org> wrote:
>> * inline unit tests. Why are your unit tests in a separate class. It
>> should be easy to put the test for a method right next to the method,
>> and hide it when you don't want to look at it. the test is stripped
>> when you compile for deployment.
>
> 1) Most unit tests are there to confirm that the response of non-
> private methods in a class to external stimulus is as specified.  If
> the test is internal to the class, you cannot be sure that will always
> elicit the same response as the same test located externally to the
> class.
>
> 2) For the tests to be valid, the shipped code should be the same at
> the tested code.  If the code (in a class) is altered between testing
> and shipping (i.e. by stripping internal tests (and presumably test
> related class variables, set up/tear down structures, etc.) then it
> should be tested again.  Except...  ..we've just thrown out the test
> code.
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to