Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Testing the emf commands on a command stack?
Testing the emf commands on a command stack? [message #427684] Thu, 26 February 2009 12:46 Go to next message
Eclipse UserFriend
Originally posted by: surayya.daimi.au.dk

Hello
Does anyone know how to make JUnit 4 tests on a command stack ?

I have a diagram generated through GMF and an EMF model
I want to make a JUnit test of the updates performed on model elements:
Create a command that will remove or add elements in a container?

In my case i have one model where an element can have two views:
1) it can be a Daigram-view
2) or a Node-view in another diagram

All the time I have to operate on the Semantic Model because this one
element is represented in 2 different Diagrams

As i have a SharedEditingDomain as proposed by itemis i do not get the
synchronization problems. But it means i have to traverse the model my
self and think of dependencies in the model myself


The model is complex and there are many cross references

I want to study how to modify the model in a right order but don't know
how to send commands around in JUnit

Does anyone have a simple example showing how to instantiate the
required environment (editor?) such that i can create my model objects
and send commands for change?


Best regards

Surayya
Re: Testing the emf commands on a command stack? [message #427686 is a reply to message #427684] Thu, 26 February 2009 12:59 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Surayya,

We have org.eclipse.emf.tests.edit which has tests for commands.
They're available as a zip with the downloads.


surayya wrote:
> Hello
> Does anyone know how to make JUnit 4 tests on a command stack ?
>
> I have a diagram generated through GMF and an EMF model
> I want to make a JUnit test of the updates performed on model elements:
> Create a command that will remove or add elements in a container?
>
> In my case i have one model where an element can have two views:
> 1) it can be a Daigram-view
> 2) or a Node-view in another diagram
>
> All the time I have to operate on the Semantic Model because this one
> element is represented in 2 different Diagrams
>
> As i have a SharedEditingDomain as proposed by itemis i do not get the
> synchronization problems. But it means i have to traverse the model my
> self and think of dependencies in the model myself
>
>
> The model is complex and there are many cross references
>
> I want to study how to modify the model in a right order but don't
> know how to send commands around in JUnit
>
> Does anyone have a simple example showing how to instantiate the
> required environment (editor?) such that i can create my model objects
> and send commands for change?
>
>
> Best regards
>
> Surayya


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:How to annotate attribute of type xsd:long to be of type LongObject in Ecore model
Next Topic:Re: ECORE 2 XML Schema and back
Goto Forum:
  


Current Time: Thu Apr 25 16:10:04 GMT 2024

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

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

Back to the top