We use GWT, GIN and the MVP pattern.  All the views inherit from the same 
base interface (our.View). I'm trying to create more tests but the number 
of views has gotten rather large.  Can I take advantage of the fact that 
all views inherit from the base View and somehow inject a Mock of the 
interface without having to list all 100+ views in a bind statement.

A simple example:

The base interface:
public interface View {
    public Widget asWidget();
}

A simple "real" View:
public interface MyView extends View {
       interface Presenter {
               void submitClicked();
       }
       setPresenter(Presenter p);
       submitSuccessful();
}

I'd like my Test Inject Module to automatically create a Mock of MyView 
(and any other class that extends View) whenever it encounters an interface 
that extends View.

I looked at bindListener but that only seems to allow you to affect an 
already created instance.

Thanks,
-Dave

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-guice+unsubscr...@googlegroups.com.
To post to this group, send email to google-guice@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to