PDE Unit test [message #119751] |
Mon, 24 November 2003 03:14 |
Eclipse User |
|
|
|
Originally posted by: dcorbin.machturtle.com
I know that there is support for running junit tests with a "plugin
framework". Can someone please point me at documentation, or a sample unit
test that leverages this?
Thanks.
|
|
|
|
Re: PDE Unit test [message #122586 is a reply to message #119828] |
Wed, 26 November 2003 22:00 |
Eclipse User |
|
|
|
Originally posted by: dcorbin.machturtle.com
OK, that helps a little. But quickly out of the gate I run into a problem.
I used a helper method in one of the other tests to create an JavaProject.
I call getAdapter(IProject.class) on this and get null. So, clearly
there's more stuff that needs to be initialized.
I'm kind of surpised not to find an "CoreTestCase" which initializes the
framework.
Obviously I'm doing something wrong, or I'm missing a concept still.
Darin Swanson wrote:
> Have a look at the org.eclipse.ant.tests.core plugin and start with
> org.eclipse.ant.tests.core.AutomatedSuite and the other test suites it
> adds as tests.
>
> HTH
> Darins
>
> "David Corbin" <dcorbin@machturtle.com> wrote in message
> news:bprsu4$7mh$1@eclipse.org...
>> I know that there is support for running junit tests with a "plugin
>> framework". Can someone please point me at documentation, or a sample
> unit
>> test that leverages this?
>>
>> Thanks.
|
|
|
|
Re: PDE Unit test [message #122618 is a reply to message #122594] |
Wed, 26 November 2003 23:55 |
Eclipse User |
|
|
|
Originally posted by: dcorbin.machturtle.com
I've looked at it. And it shows a reasonable way to create necessary data
for a project. And it's helpful. And I've looked at some of the other test
plugins. But shouldn't
IJavaProject javaProject = createJavaProject();//assume this works
assertNotNull(javaProject.getAdapter(IProject.class));
pass?
Given that it doesn't (for me), it seems like something in the basic
platform is not being initialized.
Thanks
David
Darin Swanson wrote:
> So you have studied the ProjectCreationDecorator?
>
> Darins
>
> "David Corbin" <dcorbin@machturtle.com> wrote in message
> news:bq37l4$e7j$1@eclipse.org...
>> OK, that helps a little. But quickly out of the gate I run into a
> problem.
>> I used a helper method in one of the other tests to create an
>> JavaProject.
>> I call getAdapter(IProject.class) on this and get null. So, clearly
>> there's more stuff that needs to be initialized.
>>
>> I'm kind of surpised not to find an "CoreTestCase" which initializes the
>> framework.
>>
>> Obviously I'm doing something wrong, or I'm missing a concept still.
>>
>> Darin Swanson wrote:
>>
>> > Have a look at the org.eclipse.ant.tests.core plugin and start with
>> > org.eclipse.ant.tests.core.AutomatedSuite and the other test suites it
>> > adds as tests.
>> >
>> > HTH
>> > Darins
>> >
>> > "David Corbin" <dcorbin@machturtle.com> wrote in message
>> > news:bprsu4$7mh$1@eclipse.org...
>> >> I know that there is support for running junit tests with a "plugin
>> >> framework". Can someone please point me at documentation, or a sample
>> > unit
>> >> test that leverages this?
>> >>
>> >> Thanks.
>>
|
|
|
|
Re: PDE Unit test [message #122709 is a reply to message #122625] |
Thu, 27 November 2003 15:03 |
Eclipse User |
|
|
|
Originally posted by: dcorbin.machturtle.com
Yes, it works fine. I guess I was making a false assumption about
adaptability. (I didn't even realize there was a getProject method).
Now, there appears to be lot of useful Helper classes in various test
plugins. Can they be relied on by other plugins, or are they more like
..internals. packages? It seems a shame to rewrite so much code for
testing...
Darin Swanson wrote:
> Does javaProject.getProject() work?
>
> Darins
>
|
|
|
|
Re: PDE Unit test [message #129770 is a reply to message #129418] |
Wed, 24 December 2003 17:24 |
Eclipse User |
|
|
|
Originally posted by: dcorbin.machturtle.com
Channing Walton wrote:
> David Corbin wrote:
>> Now, there appears to be lot of useful Helper classes in various test
>> plugins. Can they be relied on by other plugins, or are they more like
>> .internals. packages? It seems a shame to rewrite so much code for
>> testing...
>
> Hi David, did you get an answer to this? I too would like to create unit
> tests but rather not rely on code hobbled together from Eclipse tests
> which may be difficult to keep up with.
>
> Channing
No, I did not.
|
|
|
Powered by
FUDForum. Page generated in 0.04663 seconds