On Jul 3, 6:38 pm, Kris Nuttycombe <[email protected]> wrote: > > With respect to unit testing, Lift's singletons depend upon underlying > thread-local variables (via ThreadGlobal) to maintain state. I'm just > musing here, but do you think it might be possible to inject a layer > of indirection between Lift's singletons and the underlying state > mechanism so that the state maintenance layer could be mocked out for > tests?
I had a similar problem so introduced the cake pattern into my app so that I could mock out things like this. More about the cake pattern here: http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
