tag:blogger.com,1999:blog-5336273.post2933112511054399689..comments2023-08-23T21:56:42.999+09:00Comments on A++ [Eric Torreborre's Blog]: We need an algebra for Guice modulesUnknownnoreply@blogger.comBlogger7125tag:blogger.com,1999:blog-5336273.post-33715183274100435282010-05-26T16:30:10.000+09:002010-05-26T16:30:10.000+09:00Damien, we had the issue you mentioned today at wo...Damien, we had the issue you mentioned today at work (I was waiting for that to change my code,...). Your fix worked perfectly. Thanks a lot!Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-51710523398229719182010-05-19T05:49:02.544+09:002010-05-19T05:49:02.544+09:00Very Interesting, I didn't realize that. Thank...Very Interesting, I didn't realize that. Thanks for the comment Damien, I'll update my own code accordingly!Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-42999579524325361402010-05-19T02:47:39.319+09:002010-05-19T02:47:39.319+09:00Quick comment about the mockAndBind function. I...Quick comment about the mockAndBind function. I've found that mocking a class also requiring DI causes those dependencies to be required in the module. I've find the simplest solution is to declare the mocked class via a Provider instead, e.g. mockAndBind becomes:<br /><br />protected <T> void mockAndBind(final Class<T> mockClass) {<br /> bind(mockClass).toProvider(new Provider<T>() {<br /> public T get() {<br /> return mock(mockClass);<br /> }<br /> }).asEagerSingleton();<br />}Anonymoushttps://www.blogger.com/profile/01020017964404192797noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-33749983503745482182010-03-16T19:25:37.970+09:002010-03-16T19:25:37.970+09:00Unfortunately, I'm based in Sydney and the Sca...Unfortunately, I'm based in Sydney and the ScalaDays are going to be a bit to far for my budget :-(.<br /><br />I'll post the Fitnesse stuff as soon as I have a bit more time to think about it again. I'm not very satisfied with what I've done so far. It works but I've used statics where Singleton injection should do the trick. Hopefully that'll be clearer with one or 2 examples,...Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-81380728316480712132010-03-16T15:25:49.694+09:002010-03-16T15:25:49.694+09:00Thanks for the challenge ;-)
I shall give it a tr...Thanks for the challenge ;-) <br />I shall give it a try hopefully this week. And I am much interested in your fitnesse stuff too! <br /><br />BTW, will you be in Scala Days 2010 ?insituhttps://www.blogger.com/profile/08720847296387393506noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-88413198646880561502010-03-16T07:13:32.604+09:002010-03-16T07:13:32.604+09:00Thanks for the comment. I'd be very interested...Thanks for the comment. I'd be very interested if you can post a follow-up to show how TestComponents can be a form of Monad (what's the effect of the bind operation?)! As far as I'm concerned I may add a small post showing how it is very easy (and helpful) to plug Fitnesse on top of this.Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-68497493394214012582010-03-13T23:21:34.416+09:002010-03-13T23:21:34.416+09:00Your posts are as rare as they are interesting. Th...Your posts are as rare as they are interesting. Thanks for this one, raises a lot of ideas... One of them stem from my musings with Haskell: TestComponents are a form of Monad, the monad of environmnets for test. <br /><br />Regards,<br />Arnaudinsituhttps://www.blogger.com/profile/08720847296387393506noreply@blogger.com