Skip to content

Instantly share code, notes, and snippets.

@csattila
csattila / SchoolTestsModelManipulation.xtend
Created July 23, 2012 07:17
Model manipulation test
@Test
def changeSchoolName(){
val sns = snapshot
val pm = queryInputEIQ
pm.assertMatchResults(sns)
// MODEL MODIFICATION HERE
// change the School "Budapest University of Technology and Economics" name to "BME"
val matcher = pm.initializeMatcherFromModel(sns.EMFRootForSnapshot, "school.schools")
val s = matcher.oneArbitraryMatch.get("Sch") as School
@csattila
csattila / Labda.ecore
Created April 11, 2012 09:57
Labda ecore diagram
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="labda"
nsURI="http://labda/1.0" nsPrefix="labda">
<eClassifiers xsi:type="ecore:EClass" name="Labda">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="sugar_longObject" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELongObject"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="pottyok_int" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="sugar_long" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
</eClassifiers>