Skip to content

Commit

Permalink
adapted XsemanticsRuntimeSystemTests
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Nov 28, 2023
1 parent 2220f73 commit d1da1ea
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
Expand Up @@ -81,8 +81,8 @@ public void testSerialization() throws IOException {
new ErrorInformation(emfUtils.createEObject()));
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bos);
out.writeObject(ex);
out.close();
out.writeObject(ex);
out.close();
}

protected void assertMessage(RuleFailedException ex, String message) {
Expand Down
Expand Up @@ -14,6 +14,14 @@
*/
package org.eclipse.xsemantics.dsl.tests.runtime;

import java.util.LinkedList;
import java.util.List;

import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.xsemantics.dsl.tests.XsemanticsInjectorProvider;
import org.eclipse.xsemantics.dsl.tests.classes.BaseClass1;
import org.eclipse.xsemantics.dsl.tests.classes.BaseClass2;
import org.eclipse.xsemantics.dsl.tests.classes.DerivedAlternativeClass1;
Expand All @@ -33,31 +41,30 @@
import org.eclipse.xsemantics.runtime.RuleEnvironment;
import org.eclipse.xsemantics.runtime.RuleFailedException;
import org.eclipse.xsemantics.runtime.XsemanticsRuntimeSystem;

import java.util.LinkedList;
import java.util.List;

import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EcorePackage;
import org.junit.Before;
import org.eclipse.xtext.testing.InjectWith;
import org.eclipse.xtext.testing.XtextRunner;
import org.junit.Test;
import org.junit.runner.RunWith;

import com.google.common.collect.Lists;
import com.google.inject.Inject;
import com.google.inject.Provider;

/**
* @author bettini
*
*/
@InjectWith(XsemanticsInjectorProvider.class)
@RunWith(XtextRunner.class)
public class XsemanticsRuntimeSystemTests extends
XsemanticsRuntimeAbstractTests {

protected TestTypeSystemWithPolymorphicDispatcher ts;
@Inject
private TestTypeSystemWithPolymorphicDispatcher ts;

@Inject
private XsemanticsRuntimeSystem runtimeTypeSystem;

protected XsemanticsRuntimeSystem runtimeTypeSystem;

private Object traceElement = new Object();

public class EClassesForTesting {
Expand Down Expand Up @@ -102,14 +109,6 @@ public Object get() {

}

@Override
@Before
public void setUp() throws Exception {
super.setUp();
ts = get(TestTypeSystemWithPolymorphicDispatcher.class);
runtimeTypeSystem = get(XsemanticsRuntimeSystem.class);
}

@Test
public void testNoSuchMethod() throws RuleFailedException {
try {
Expand Down

0 comments on commit d1da1ea

Please sign in to comment.