Unit testing of GMF diagram editors and shortcuts with JUnit
GMF / GMF Code Samples
A bit of background: My GMF diagramming plugin allows for elements to be provided as shortcuts in the model. I have extended the plugin to allow for automatically adding new shortcuts to the diagram editors, if they are connections of edges in the model.
I wanted a way to test the following things with JUnit:
A bit of background: My GMF diagramming plugin allows for elements to be provided as shortcuts in the model. I have extended the plugin to allow for automatically adding new shortcuts to the diagram editors, if they are connections of edges in the model.
I wanted a way to test the following things with JUnit:
- Diagram files can be loaded
- Model files can be initialised by going Right Click > Initialise new my_diagram
- The visual display of the diagram files (which nodes are displayed, etc)
- Model files with diagram partitioning can be opened and traversed
- Shortcut elements are displayed as shortcuts
- My custom shortcut-generation functionality
- Diagram files can be loaded (method)
- Model files can be initialised (helper method)
- The visual display of the diagram files
- Model files with diagram partitioning can be opened and traversed
- Shortcut elements are displayed as shortcuts (method)
- My custom shortcut-generation functionality (the project as a whole)