Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » wrong generation of the tests plugin?
wrong generation of the tests plugin? [message #417520] Fri, 14 March 2008 16:40 Go to next message
Sandro Boehme is currently offline Sandro BoehmeFriend
Messages: 95
Registered: July 2009
Member
Hello,

let's say I have the following small My.ecore model:

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="mypackage"
nsURI="mypackage" nsPrefix="mypackage">
<eClassifiers xsi:type="ecore:EClass" name="MyDocument"
instanceClassName="javax.swing.text.Document"/>
<eClassifiers xsi:type="ecore:EClass" name="MySpecificDocument"
eSuperTypes="#//MyDocument"/>
</ecore:EPackage>

and I do the following steps:
o generating the model code
o implementing the interface using the QuickFix feature of Eclipse
o generating the tests plugin

it results in a tests plugin with a compile error.Shouldn't
"MySpecificDocument":
o extend TestCase
o import junit.framework.TestCase;
o and declare something like this:

/**
* The fixture for this Hierarchy Node test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MySpecificDocument fixture = null;

Do I miss something here?
Thanks in advance for any help.

Best regards,

Sandro
Re: wrong generation of the tests plugin? [message #417566 is a reply to message #417520] Fri, 14 March 2008 21:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Sandro,

Looks buggy to me. It's like the test case generator is assuming the
thing has interface/abstract == true when it does not. Please open a
bugzilla with the example.


Sandro Böhme wrote:
> Hello,
>
> let's say I have the following small My.ecore model:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="mypackage"
> nsURI="mypackage" nsPrefix="mypackage">
> <eClassifiers xsi:type="ecore:EClass" name="MyDocument"
> instanceClassName="javax.swing.text.Document"/>
> <eClassifiers xsi:type="ecore:EClass" name="MySpecificDocument"
> eSuperTypes="#//MyDocument"/>
> </ecore:EPackage>
>
> and I do the following steps:
> o generating the model code
> o implementing the interface using the QuickFix feature of Eclipse
> o generating the tests plugin
>
> it results in a tests plugin with a compile error.Shouldn't
> "MySpecificDocument":
> o extend TestCase
> o import junit.framework.TestCase;
> o and declare something like this:
>
> /**
> * The fixture for this Hierarchy Node test case.
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> protected MySpecificDocument fixture = null;
>
> Do I miss something here?
> Thanks in advance for any help.
>
> Best regards,
>
> Sandro


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: wrong generation of the tests plugin? [message #417568 is a reply to message #417566] Fri, 14 March 2008 22:00 Go to previous message
Sandro Boehme is currently offline Sandro BoehmeFriend
Messages: 95
Registered: July 2009
Member
Hi Ed,

thanks for looking into it. The bug has been created
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=222820).

Regards,

Sandro

Ed Merks schrieb:
> Sandro,
>
> Looks buggy to me. It's like the test case generator is assuming the
> thing has interface/abstract == true when it does not. Please open a
> bugzilla with the example.
>
>
> Sandro Böhme wrote:
>> Hello,
>>
>> let's say I have the following small My.ecore model:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <ecore:EPackage xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="mypackage"
>> nsURI="mypackage" nsPrefix="mypackage">
>> <eClassifiers xsi:type="ecore:EClass" name="MyDocument"
>> instanceClassName="javax.swing.text.Document"/>
>> <eClassifiers xsi:type="ecore:EClass" name="MySpecificDocument"
>> eSuperTypes="#//MyDocument"/>
>> </ecore:EPackage>
>>
>> and I do the following steps:
>> o generating the model code
>> o implementing the interface using the QuickFix feature of Eclipse
>> o generating the tests plugin
>>
>> it results in a tests plugin with a compile error.Shouldn't
>> "MySpecificDocument":
>> o extend TestCase
>> o import junit.framework.TestCase;
>> o and declare something like this:
>>
>> /**
>> * The fixture for this Hierarchy Node test case.
>> * <!-- begin-user-doc -->
>> * <!-- end-user-doc -->
>> * @generated
>> */
>> protected MySpecificDocument fixture = null;
>>
>> Do I miss something here?
>> Thanks in advance for any help.
>>
>> Best regards,
>>
>> Sandro
Previous Topic:Reload a model from annotated java
Next Topic:EMF 2nd Edition Example Source
Goto Forum:
  


Current Time: Sat Apr 27 00:46:27 GMT 2024

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

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

Back to the top