Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » widgetWithId(String) -> widgetWithId(Object)
widgetWithId(String) -> widgetWithId(Object) [message #17701] Tue, 27 January 2009 10:35
Hans Schwaebli is currently offline Hans Schwaebli
Messages: 70
Registered: July 2009
Member
What do you think about using Object parameter type instead of String for
the "withId" methods?

The setData method in the Widget class uses Object too. String narrows it.

I would have no problems with it normally, but I was told to use a custom
Object for the ID.

Of course it makes sense to use String for the ID, but what when someone
wants it to be type safe? Thats why I shall use a custom object (see below
a code example).

What do you think about using Object type instead of String for the
"withId" methods of SWTBot in order to reflect the capabilities of the
setData method in the Widget class 1:1?


public final class UiTestId
implements Serializable, org.jcoderz.commons.EnumType
{
public static final UiTestId WEIGHT_TEXT_ID
= new UiTestId("weightTextId");
Previous Topic:CONSECUTIVES TEST
Next Topic:SWTBot and inputs from file
Goto Forum:
  


Current Time: Mon Apr 21 05:47:20 EDT 2014

Powered by FUDForum. Page generated in 0.02715 seconds