redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

testcase and non test classes


Goto page 1, 2  Next
 
Post new topic   Reply to topic    Web Design Forums -> JAVA programming forum
View previous topic :: View next topic  
Author Message
Kopilman



Joined: 25 May 2006
Posts: 162
I'm being prevented from unit testing the internals of my application because I like to make things package-private if they shouldn't be used outside the package. But then tests can't test them out
Is it bad to put testcase classes in the same package as the non test classes?
  Reply with quote


Lusis Backwood JR



Joined: 26 May 2006
Posts: 87
Location: United States
That's one reason I believe private/public should be part of the documentation, and not part of the language semantics
  Reply with quote
Kopilman



Joined: 25 May 2006
Posts: 162
Or am i doing something else wrong
Lusis Backwood JR, documentation doesn't force anything
I'd prefer an option to say, "only this package and this package can use it"
  Reply with quote
Poolkop



Joined: 01 Jun 2006
Posts: 123
I've seen the tests separated into a different source folder or project, but still in the same package as the classes they test ...
  Reply with quote
Lusis Backwood JR



Joined: 26 May 2006
Posts: 87
Location: United States
Another good approach is taken by lisp, where unexported symbols can still be used in other packages, but using a different syntax
  Reply with quote
Kopilman



Joined: 25 May 2006
Posts: 162
Poolkop, interesting
I looked at junit source
And they just have a bunch of methods/classes called internal
I think that's stupid and i'd prefer to avoid it
  Reply with quote
Lusis Backwood JR



Joined: 26 May 2006
Posts: 87
Location: United States
Kopilman, why not just make the members public?
  Reply with quote
Kopilman



Joined: 25 May 2006
Posts: 162
I don't know what the definition of a member is unless it's sexual
You talking about instance variables?
  Reply with quote
Lusis Backwood JR



Joined: 26 May 2006
Posts: 87
Location: United States
Member of a class
  Reply with quote
Kopilman



Joined: 25 May 2006
Posts: 162
Or the classes?
  Reply with quote
Page 1 of 2 Goto page 1, 2  Next
Post new topic   Reply to topic    Web Design Forums -> JAVA programming forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group