|
Re: Load a Papyrus ModelSet programmatically [message #1767728 is a reply to message #1767721] |
Mon, 10 July 2017 12:01 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi Marc-Florian,
In JUnit tests, you can use the @Rules provided in the Papyrus JUnit Utils plug-in, e.g.:
@Rule
public final ModelSetFixture modelSet = new ModelSetFixture();
@Test
@PluginResource("/resources/model/model.uml")
public void test() {
ModelSet ms = modelSet.getModelSet();
}
Check the Javadoc of org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture<T> for more details.
If you don't want to reuse the complete rule, you can reuse the implementation from these methods:
org.eclipse.papyrus.junit.utils.rules.ModelSetFixture.createEditingDomain()
org.eclipse.papyrus.junit.utils.rules.ModelSetFixture.didLoadResourceSet()
Regards,
Camille
Camille Letavernier
|
|
|
Powered by
FUDForum. Page generated in 0.02432 seconds