[AGR] ClassCastException in Verification Hook [message #94299] |
Wed, 28 March 2007 11:34 |
Eclipse User |
|
|
|
Originally posted by: Christopher.Schick.gmx.de
Guys,
I'm using the AGR to record a couple of user interactions with a custom
plug-in and test the result through Verification Hooks.
Recording works fine as well as creation of the Verification Hook code
skeleton.
However, inside the Hook method I want to access the properties of a
selected view. To achieve this I need to typecast arg0 (IViewPart) to the
type of the selected view (e.g. CustomView).
As soon as I try to cast arg0 to one of our custom view classes, I get a
ClassCastException.
Funny enough, when writing the class name to the console via
"System.out.println(arg0.getClass());"
it returns: "class com.voiceobjects.CustomView"
Now when trying to do the cast it fails: "com.voiceobjects.CustomView CV =
(CustomView)arg0;"
Any insight ?
Thanks
-Chris
P.S.: Type hierarchy for CustomView is WorkbenchPart => ViewPart => VOView
=> CustomView
|
|
|
|
Re: [AGR] ClassCastException in Verification Hook [message #94376 is a reply to message #94346] |
Wed, 28 March 2007 16:41 |
Eclipse User |
|
|
|
Originally posted by: Christopher.Schick.gmx.de
Hi Ali,
Actually adding the plug-in to the depency list did the trick. Many thanks
for your help.
Imp question: Is there any documentation about the use of classloaders in
the test execution suites ?
I don't want to face similar issues when automating the tests.
Thanks
-Chris
|
|
|
|
Powered by
FUDForum. Page generated in 0.03406 seconds