Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Singletons and testing

 
Pepe Papa
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
i'd like to know if there is any problem with programatic Singletons at test time, which are them?

Thks!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"pepepapa82"

Please check your private messages.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pepe,
It depends. If you want to mock out a class, a singleton makes things much harder than necessary.
 
Vilmantas Baranauskas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quite interesting article about singletons:
http://steve.yegge.googlepages.com/singleton-considered-stupid
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic