You want a GWT test: http://code.google.com/webtoolkit/doc/latest/DevGuideTesting.html
On Aug 25, 2:18 pm, BM <bhushan.ma...@gmail.com> wrote: > I have created a stand alone custom widget using GWT UIBinder with the > help of GWT Designer. > > The two files which I have are : > > MultipleListBoxCustomWidget.java > MultipleListBoxCustomWidget.ui.xml > > I use this widget is my GWT application which I use activites and > places framework and all my views are created using UIBinders. > > I use this widget in one of my view with UIBinder tag referencing the > package name of the directory as the name spaces. > > Question: > How do I Unit testing my widget code as it is all self-contained. The > functionality of the widget is show two list boxes on the screen with > 4 buttons on the center. Each of these buttons are ">", "<", ">>" and > "<<" . This means I can move items from the list to another list > depending on which buttons are clicked. I kept the code as self- > contained and reusable so that I can pass any two different ArrayList > to my widget as two separate methods calls inside the widget and those > methods basically populates respective Listbox items inside the > widget. I also gave getter methods to return the changed item > arrangement of the ListBox items as ArrayList object as part of two > separate method calls. > > Since the widget code is self-contained, my click handlers are inside > this java file MultipleListBoxCustomWidget.java for example - > > @UiHandler("leftToRightButton") > void onLeftToRightButtonClick(ClickEvent event) {.....} > > So testing is getting difficult. There is no controller because I > can't have a self-contained widget with MVP activities and places > inside to be used in another web applications which is designed using > activities and places. > > Any advise? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.