Re: How to do JUnit testing for a composite widget created using UIBinder?
So you are saying I should have three files for a custom composite widget using UIBinder? .java file .ui.xml file Presenter file ? On Aug 28, 5:22 am, Alex Dobjanschi alex.dobjans...@gmail.com wrote: IMO You should not do unit testing for views. All you could test is what, that they look ok? Or they respond to app events? Or rather generate an app event, based on user input? While those cases are indeed valid, testing them by hand is very very easy. You should however have a Presenter/Mediator for that specific view, which acts in-between that view and the rest of application. It makes more sense to test that that presenter/mediator, making sure it works within app's context (generating events, responding to events). But again, this is just my opinion. My 2 cents, Alex. -- 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.
Re: How to do JUnit testing for a composite widget created using UIBinder?
IMO You should not do unit testing for views. All you could test is what, that they look ok? Or they respond to app events? Or rather generate an app event, based on user input? While those cases are indeed valid, testing them by hand is very very easy. You should however have a Presenter/Mediator for that specific view, which acts in-between that view and the rest of application. It makes more sense to test that that presenter/mediator, making sure it works within app's context (generating events, responding to events). But again, this is just my opinion. My 2 cents, Alex. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/XCww5sb_MAAJ. 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.
Re: How to do JUnit testing for a composite widget created using UIBinder?
You could learn some principles form: http://arcbees.wordpress.com/2010/11/25/testing-views-using-gwt-platform-mockingbinder/ To easily test view you have to get rid of GWT.create(UiBinder.class) in your view. 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. I don't understand. Why Presenter View could not be self-contained? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/BPHi9_SbbQwJ. 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.
Re: How to do JUnit testing for a composite widget created using UIBinder?
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.
How to do JUnit testing for a composite widget created using UIBinder?
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.