|widgetWithId(String) -> widgetWithId(Object) [message #17701]
||Tue, 27 January 2009 10:35
| Hans Schwaebli
Registered: July 2009
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");
Powered by FUDForum
. Page generated in 0.02367 seconds