1- package org.gemoc.execution.sequential.javaxdsml.tests.eclipse.shared
1+ /* ******************************************************************************
2+ * Copyright (c) 2017 Inria.
3+ * All rights reserved. This program and the accompanying materials
4+ * are made available under the terms of the Eclipse Public License v1.0
5+ * which accompanies this distribution, and is available at
6+ * http://www.eclipse.org/legal/epl-v10.html
7+ *
8+ * Contributors:
9+ * Inria - initial API and implementation
10+ *******************************************************************************/
11+ package org.gemoc.xdsmlframework.test.lib
212
313import com.google.common.base.Charsets
414import com.google.common.io.CharStreams
@@ -81,6 +91,10 @@ import org.eclipse.core.runtime.IProgressMonitor
8191import org.eclipse.core.runtime.Status
8292import com.google.common.io.ByteStreams
8393
94+
95+ /**
96+ * Class containing helper methods for testing a workspace in a GEMOC Language workbench
97+ */
8498class WorkspaceTestHelper {
8599 static final String MELANGE_CMD_GENERATE_ALL = " fr.inria.diverse.melange.GenerateAll"
86100 static final String MELANGE_CMD_GENERATE_ADAPTERS = " fr.inria.diverse.melange.GenerateAdapters"
@@ -464,8 +478,8 @@ class WorkspaceTestHelper {
464478
465479 Assert . assertEquals(pkg. name, node. text. toString)
466480
467- val subPack = pkg. ESubpackages
468- val classes = pkg. EClassifiers
481+ val subPack = pkg. getESubpackages
482+ val classes = pkg. getEClassifiers
469483 val subNodes = node. children
470484
471485 subPack. forEach[p |
@@ -487,23 +501,23 @@ class WorkspaceTestHelper {
487501
488502 Assert . assertEquals(cls. name, node. text. toString)
489503
490- val ref = cls. EAllReferences
491- val att = cls. EAllAttributes
492- val op = cls. EAllOperations
504+ val ref = cls. getEAllReferences
505+ val att = cls. getEAllAttributes
506+ val op = cls. getEAllOperations
493507 val subNodes = node. children
494508
495509 ref. forEach[r |
496- val n = subNodes. findFirst[text. toString == (r. name + " : " + r. EType . name)]
510+ val n = subNodes. findFirst[text. toString == (r. name + " : " + r. getEType . name)]
497511 Assert . assertNotNull(n)
498512 ]
499513
500514 att. forEach[a |
501- val n = subNodes. findFirst[text. toString == a. name + " : " + a. EType . name]
515+ val n = subNodes. findFirst[text. toString == a. name + " : " + a. getEType . name]
502516 Assert . assertNotNull(n)
503517 ]
504518
505519 op. forEach[o |
506- val n = subNodes. findFirst[text. toString == o. name + " : " + o. EType . name]
520+ val n = subNodes. findFirst[text. toString == o. name + " : " + o. getEType . name]
507521 Assert . assertNotNull(n)
508522 ]
509523 }
0 commit comments