Reputation
450
Next privilege 500 Rep.
Access review queues
Badges
5 10
Impact
~9k people reached

  • 0 posts edited
  • 0 helpful flags
  • 30 votes cast
Apr
28
comment Factory for creating a singleton instance
@gbjbaanb one thing i didn't mention is that we're using C# but not in a MSFT environment (we are using Unity and Mono for game development). Not sure Fakes would work in that context, but i will check!
Apr
28
comment Factory for creating a singleton instance
@Telastyn that means i have to refactor all code that access this singleton. This is a big change, one that i'm trying to avoid at the moment.
Apr
28
comment Factory for creating a singleton instance
Not sure I understand "Then all consumers of ISomeSingleton will just get an constructor parameter of ISomeSingleton."
Apr
28
comment Factory for creating a singleton instance
Some of these tools have a hard time faking static properties or stuff like that. I will look into it though !
Mar
31
comment Contradiction of layered design and global data access for analytics reporting
Isn't a "single interface for all the data" the exact opposite of splitting the apps into layers and components?
Oct
17
comment Code Review tools - to use or not?
Thanks @che , helpful as ever
May
22
comment Is it a bad practice to modify code strictly for testing purposes
DI is not the major question (i was only trying to give an example), the point was whether it would be OK to provide another method that originally wasn't intended to be created, only for the sake of testing.
May
22
comment Is it a bad practice to modify code strictly for testing purposes
You're right - Type or Assembly, the point was that the code should allow supplying that as a parameter, although it may seem that this functionality is there only to be used for testing...