Preserve GenModel annotation to verify EOperations are implemented [message #1066726] |
Thu, 04 July 2013 02:35  |
Eclipse User |
|
|
|
Hello,
I have a large model which implicitly switches to "initialize by loading
..ecore". The ecore it loads is derived from the original ecore
definition upon model generation, and apparently does not contain the
GenModel annotation anymore. I tried "Suppress GenModel Annotations" :=
false, but it didn't help.
Background: I need the GenModel annotations in the model to be able to
write a unit that verifies all my custom EOperations are actually
implemented.
If I can't easily get the GenModel annotations - is there maybe another
way to write such a test?
Thanks
Marius
|
|
|
|
Re: Preserve GenModel annotation to verify EOperations are implemented [message #1066742 is a reply to message #1066730] |
Thu, 04 July 2013 03:56  |
Eclipse User |
|
|
|
On 04.07.2013 08:53, Ed Merks wrote:> Marius,
>
> Comments below.
>
> On 04/07/2013 8:35 AM, Marius Gröger wrote:
>> Hello,
>>
>> I have a large model which implicitly switches to "initialize by loading
>> .ecore". The ecore it loads is derived from the original ecore
>> definition upon model generation, and apparently does not contain the
>> GenModel annotation anymore.
> So the derivation step is not preserving the annotations?
I checked again and I think I found my issue: I'm using multiple models
which are derived from each other and I accidentally had looked at an
EOperation of a model which I had not generated with "Suppress GenModel
Annotations".
>> If I can't easily get the GenModel annotations - is there maybe another
>> way to write such a test?
Anyway I'm using only methods without arguments and will now write my
tests such that I create an object instance and call the EOperation.
Since I demand anyway that the operation shall never throw an exception,
I will now just check that that is no exception (ie. no
UnsupportedOperationException or anything else).
Regards
Marius
|
|
|
Powered by
FUDForum. Page generated in 0.04234 seconds