Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to compare dynamic ecore models
How to compare dynamic ecore models [message #503306] Fri, 11 December 2009 13:22 Go to next message
Nikita Missing nameFriend
Messages: 32
Registered: October 2009
Member
Is there a way to compare two ecore models? My application creates dynamic models, and I would like to write unit tests to verify that a created model is correct by comparing it against an expected model.

Another way to say this is, how can I implement this function: Assert.assertEquals(EPackage expected, EPackage actual)
Re: How to compare dynamic ecore models [message #503372 is a reply to message #503306] Sat, 12 December 2009 13:56 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Nikita,

You can use EcoreUtil.equals but I think without the fix to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=283419 that EEnumLiterals
for copies/clones of dynamic models won't compare as equals.


Nikita wrote:
> Is there a way to compare two ecore models? My application creates
> dynamic models, and I would like to write unit tests to verify that a
> created model is correct by comparing it against an expected model.
>
> Another way to say this is, how can I implement this function:
> Assert.assertEquals(EPackage expected, EPackage actual)


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] Long EList:s and caching
Next Topic:EMF Validation, RollBack on error
Goto Forum:
  


Current Time: Tue Apr 16 19:45:18 GMT 2024

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

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

Back to the top