]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/ScriptTestBase.java
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / ScriptTestBase.java
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/ScriptTestBase.java b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/ScriptTestBase.java
deleted file mode 100644 (file)
index 9e4401d..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.simantics.scl.compiler.tests;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-
-import org.junit.Before;
-import org.simantics.scl.compiler.commands.CommandSession;
-import org.simantics.scl.compiler.commands.TestScriptExecutor;
-import org.simantics.scl.compiler.module.repository.ModuleRepository;
-import org.simantics.scl.compiler.source.repository.CompositeModuleSourceRepository;
-import org.simantics.scl.compiler.source.repository.SourceRepositories;
-
-public class ScriptTestBase {
-    
-    private final String path;
-    
-    ModuleRepository moduleRepository;
-    
-    public ScriptTestBase(String path) {
-        this.path = path;
-    }
-    
-    @Before
-    public void initialize() throws Exception {
-        moduleRepository = new ModuleRepository(
-                new CompositeModuleSourceRepository(
-                        SourceRepositories.BUILTIN_SOURCE_REPOSITORY,
-                        SourceRepositories.PRELUDE_SOURCE_REPOSITORY
-                        ));
-    }
-    
-    protected void test() throws Exception {
-        String testScriptName = Thread.currentThread().getStackTrace()[2].getMethodName();
-        String testPath = "scripts/" + testScriptName + ".sts";
-
-        CommandSession session = new CommandSession(moduleRepository, null);
-        new TestScriptExecutor(session, 
-                new BufferedReader(
-                        new InputStreamReader(getClass().getResourceAsStream(testPath), Charset.forName("UTF-8"))),
-                        null)
-        .execute();
-    }
-    
-}