@@ -161,21 +161,30 @@ describe("Import/export", function () {
161
161
expect ( node instanceof Node ) . to . be . true ;
162
162
expect ( node . statementsAndDeclarations . length ) . to . equal ( 26 ) ;
163
163
} ) ;
164
- it ( "containments and inheritance " , function ( ) {
164
+ it ( "containments and references " , function ( ) {
165
165
const resourceSet = ECore . ResourceSet . create ( ) ;
166
166
const resource = resourceSet . create ( { uri : 'file:data/rpg.metamodel.json' } ) ;
167
167
const mmBuffer = fs . readFileSync ( "tests/data/rpg.metamodel.json" ) ;
168
168
const ePackages = loadEPackages ( JSON . parse ( mmBuffer . toString ( ) ) , resource ) ;
169
169
expect ( ePackages . length ) . to . equal ( 2 ) ;
170
+
170
171
const PlistParameter = ePackages [ 1 ] . eContents ( ) . find ( x => x . get ( "name" ) == "PlistParameter" ) ;
171
- const eo = PlistParameter . create ( { } ) ;
172
- const properties = new ECoreNode ( eo ) . getProperties ( ) ;
172
+ let eo = PlistParameter . create ( { } ) ;
173
+ let properties = new ECoreNode ( eo ) . getProperties ( ) ;
173
174
expect ( properties ) . to . eql ( {
174
175
"name" : { "child" : true , "multiple" : false , "name" : "name" } ,
175
176
"sourceField" : { "child" : true , "multiple" : false , "name" : "sourceField" } ,
176
177
"targetField" : { "child" : true , "multiple" : false , "name" : "targetField" } ,
177
178
"type" : { "child" : true , "multiple" : false , "name" : "type" }
178
179
} ) ;
180
+
181
+ const InvokeSubroutineStatement = ePackages [ 1 ] . eContents ( ) . find ( x => x . get ( "name" ) == "InvokeSubroutineStatement" ) ;
182
+ eo = InvokeSubroutineStatement . create ( { } ) ;
183
+ properties = new ECoreNode ( eo ) . getProperties ( ) ;
184
+ expect ( properties ) . to . eql ( {
185
+ "conditionalIndicator" : { "child" : true , "multiple" : false , "name" : "conditionalIndicator" } ,
186
+ "subroutine" : { "child" : false , "multiple" : false , "name" : "subroutine" }
187
+ } ) ;
179
188
} ) ;
180
189
it ( "importing using raw Ecore.js" ,
181
190
function ( ) {
0 commit comments