singletons complicates unit tests@@

http://code.google.com/p/google-singleton-detector/wiki/WhySingletonsAreControversial gave 2+1 /indictments/ against singletons in general. The first indictment is testability.

xp: in %% FTTP parser, I saw no real problem. The “user” is LoaderFactory.java. I could be wrong but don’t think it and my singleton are tightly coupled, and complicating unit test.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s