How to unit test global scoping [message #861118] |
Sat, 28 April 2012 07:33  |
Eclipse User |
|
|
|
Hi,
for my local scope provider, I easily provided unit tests by building partial EMF-ASTs
and calling getScope(..) with the corresponding element.
For my global scope provider I want to do the same. However, i wonder how to put an IEObjectDescription onto the index programatically.
I'm looking forward to any ideas or hints.
Regards,
Felix
|
|
|
|
|
|
Re: How to unit test global scoping [message #867707 is a reply to message #865293] |
Tue, 01 May 2012 08:43   |
Eclipse User |
|
|
|
Well, I misunderstood you earlier, I do some changes to the index: I provide an own implementation of IDefaultResourceDescriptionStrategy (btw, why is there a Default in the interface name?) to handle which EObjects are exported.
When I do create a ResourceSet (with ResourceSetImpl) for the tests, how does the framework know of my own ResourceSet or does the creation of ResourceSetImpl take care of that?
A second thing is, i want to check that a declared entity is unique on the index. For that reason I inject my Validator with an instance of IResourceDescriptions (note the plural 's') and calling the "getExportedObjects(..)" method. Running the plugin, this works fine. However, running the tests, an exception is thrown when invoking that method. I guess it has something to do with the index and ResourceSet, too?
Thanks so far,
Felix
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06983 seconds