Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » PDE Unit test
PDE Unit test [message #119751] Sun, 23 November 2003 22:14 Go to next message
Eclipse UserFriend
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 #119828 is a reply to message #119751] Mon, 24 November 2003 01:33 Go to previous messageGo to next message
Eclipse UserFriend
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 #122586 is a reply to message #119828] Wed, 26 November 2003 17:00 Go to previous messageGo to next message
Eclipse UserFriend
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 #122594 is a reply to message #122586] Wed, 26 November 2003 17:22 Go to previous messageGo to next message
Eclipse UserFriend
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 #122618 is a reply to message #122594] Wed, 26 November 2003 18:55 Go to previous messageGo to next message
Eclipse UserFriend
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 #122625 is a reply to message #122618] Wed, 26 November 2003 19:51 Go to previous messageGo to next message
Eclipse UserFriend
Does javaProject.getProject() work?

Darins

"David Corbin" <dcorbin@machturtle.com> wrote in message
news:bq3ecs$koj$1@eclipse.org...
> 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 10:03 Go to previous messageGo to next message
Eclipse UserFriend
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 #129418 is a reply to message #122709] Tue, 23 December 2003 11:44 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: PDE Unit test [message #129770 is a reply to message #129418] Wed, 24 December 2003 12:24 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Eclipse Update 3.0M2 -> 3.0M6
Next Topic:Problems with Eclipse working with code that is in clearcase
Goto Forum:
  


Current Time: Mon May 05 12:52:34 EDT 2025

Powered by FUDForum. Page generated in 0.04647 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top