On Fri, Nov 12, 2010 at 4:19 PM, Christian Goudreau <[email protected]> wrote: > No, unfortunately, you can't ! > Just a clarification, Jukito isn't like easy mock. Jukito use Mockito and is > build on top of it to provide an easy way to work with injection and mocks > inside your test cases. > Unless you want to test the behavior of LocalizableResource a simple: > when(resource.aResource()).thenReturn("Something") would be enough. > (Mockito) > Well, if you specifically want to test what is returned by > LocalizableResource, that's another story and you will have to use > GwtTestCase. Personnally, I wouldn't do that since that point should already > be heavily tested by Gwt teams themselves. > I do see a way to do it without GwtTestCase though, but that would require a > lot of work and Java reflexion.
Yea. That was what I was fearing. Well. Then we have to rewrite our tests a bit. Not sure how. Btw. Jukito is also a project of you and Phil. Great :) Jukito really sounds like a great idea and I am really considering using it... Do you already sell Fan T-Shirts? ;) Cheers and thanks for the clarification, Raphael > Cheers, > On Fri, Nov 12, 2010 at 10:03 AM, Raphael André Bauer > <[email protected]> wrote: >> >> On Fri, Nov 12, 2010 at 3:12 PM, Christian Goudreau >> <[email protected]> wrote: >> > I know one that is working really well for me. Though I actually Mock >> > MyLocalizableResource. >> > I simply use Gin to inject MyLocalizableResource instead of >> > Gwt.create(). >> > Then I use Jukito to automatically mock every interface unbinded with >> > mockito. >> > More info on Gin gwt.create() magic: >> > http://code.google.com/p/google-gin/wiki/GinTutorial#Deferred_Binding >> > Cheers, >> >> >> Thanks for that hint :) - I was searching for a nice mocking lib - >> jukito seems to way cooler than easymock... >> >> That was the approach I took right now - the problem is, that I do not >> get the "real" message of the interface... I would like to get "real" >> message for a certain language... Exactly what GWT.create does - but >> without the need for a GWTTestCase... >> >> Maybe I got you wrong, but does your approach really bind the >> properties files of a certain language to the respective >> LocalizedResource? >> >> >> Thanks! >> >> >> >> Cheers, >> >> Raphael >> >> > >> > On Fri, Nov 12, 2010 at 8:53 AM, Raphael André Bauer >> > <[email protected]> wrote: >> >> >> >> Hi, >> >> >> >> >> >> I want to test my i18n GWT application. We got a MyLocalizableResource >> >> extends com.google.gwt.i18n.client.Messages connected to properties >> >> files representing different languages. >> >> >> >> I can test that using a GWTTestCase and >> >> GWT.create(MyLocalizableResource). >> >> >> >> But I want to test that setup in a fast JUnit Test. Is there a simple >> >> way to "bind" the properties files to MyLocalizableResource without >> >> the need for a GWTTestCase? >> >> >> >> >> >> Many thanks in advance :) >> >> >> >> Cheers, >> >> >> >> >> >> >> >> Raphael >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> >> Groups >> >> "Google Web Toolkit" 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/google-web-toolkit?hl=en. >> >> >> > >> > >> > >> > -- >> > Christian Goudreau >> > www.arcbees.com >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "Google Web Toolkit" 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/google-web-toolkit?hl=en. >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Web Toolkit" 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/google-web-toolkit?hl=en. >> > > > > -- > Christian Goudreau > www.arcbees.com > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" 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/google-web-toolkit?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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/google-web-toolkit?hl=en.
