Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Test with JUnit4 in an EMF project
Test with JUnit4 in an EMF project [message #479249] Mon, 10 August 2009 12:48 Go to next message
Eclipse UserFriend
Originally posted by: aurelien.pupier.esial.net

Hi,

I post in the two newsgroup because I hope that both can bring me the solution.

I tried to test some creation of EObject.
But in my JUnit test, the XXXFactory.eINSTANCE return the generated instance although the extended factory that I use and declared in another plugin via o.e.emf.ecore.factory_override.

How can I set JUnit test aware of this?

I already try with adding the plugin with extended factory User entries classpath of the JUnit test launch configuration but with no change.


Thanks for any hints.

Aurelien Pupier
Re: Test with JUnit4 in an EMF project [message #479272 is a reply to message #479249] Mon, 10 August 2009 13:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26285
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030107040108030309080905
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Aurelien,

You need to run as an Eclipse/OSGi application for plugin registrations
to be taken into account. Running as an ordinary Java application won't
do the trick, at least not until this is supported:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=271253


Aurelien Pupier wrote:
> Hi,
>
> I post in the two newsgroup because I hope that both can bring me the
> solution.
>
> I tried to test some creation of EObject.
> But in my JUnit test, the XXXFactory.eINSTANCE return the generated
> instance although the extended factory that I use and declared in
> another plugin via o.e.emf.ecore.factory_override.
>
> How can I set JUnit test aware of this?
>
> I already try with adding the plugin with extended factory User
> entries classpath of the JUnit test launch configuration but with no
> change.
>
>
> Thanks for any hints.
>
> Aurelien Pupier

--------------030107040108030309080905
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Aurelien,<br>
<br>
You need to run as an Eclipse/OSGi application for plugin registrations
to be taken into account.&nbsp; Running as an ordinary Java application
won't do the trick, at least not until this is supported:<br>
<blockquote><a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=271253">https://bugs.eclipse.org/bugs/show_bug.cgi?id=271253</a><br>
</blockquote>
<br>
Aurelien Pupier wrote:
<blockquote cite="mid:h5p4vi$pa2$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I post in the two newsgroup because I hope that both can bring me the
solution.
<br>
<br>
I tried to test some creation of EObject.
<br>
But in my JUnit test, the XXXFactory.eINSTANCE return the generated
instance although the extended factory that I use and declared in
another plugin via o.e.emf.ecore.factory_override.
<br>
<br>
How can I set JUnit test aware of this?
<br>
<br>
I already try with adding the plugin with extended factory User entries
classpath of the JUnit test launch configuration but with no change.
<br>
<br>
<br>
Thanks for any hints.
<br>
<br>
Aurelien Pupier
<br>
</blockquote>
</body>
</html>

--------------030107040108030309080905--
Re: Test with JUnit4 in an EMF project [message #479280 is a reply to message #479272] Mon, 10 August 2009 14:01 Go to previous message
Eclipse UserFriend
Originally posted by: aurelien.pupier.esial.net

thanks for your reply.
I will test it via an Eclipse application ;)

Ed Merks a écrit :
> Aurelien,
>
> You need to run as an Eclipse/OSGi application for plugin registrations
> to be taken into account. Running as an ordinary Java application won't
> do the trick, at least not until this is supported:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=271253
>
>
> Aurelien Pupier wrote:
>> Hi,
>>
>> I post in the two newsgroup because I hope that both can bring me the
>> solution.
>>
>> I tried to test some creation of EObject.
>> But in my JUnit test, the XXXFactory.eINSTANCE return the generated
>> instance although the extended factory that I use and declared in
>> another plugin via o.e.emf.ecore.factory_override.
>>
>> How can I set JUnit test aware of this?
>>
>> I already try with adding the plugin with extended factory User
>> entries classpath of the JUnit test launch configuration but with no
>> change.
>>
>>
>> Thanks for any hints.
>>
>> Aurelien Pupier
Previous Topic:Instance Name field is always blank if the jdk version is 1.5
Next Topic:Problem with AGR
Goto Forum:
  


Current Time: Sun Dec 21 06:22:55 GMT 2014

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

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