1 package org.simantics.scl.osgi.tests;
3 import org.eclipse.core.runtime.IProgressMonitor;
4 import org.eclipse.core.runtime.NullProgressMonitor;
5 import org.junit.AfterClass;
6 import org.junit.Assert;
7 import org.junit.BeforeClass;
9 import org.simantics.PlatformException;
10 import org.simantics.Simantics;
11 import org.simantics.application.arguments.Arguments;
12 import org.simantics.application.arguments.IArgumentFactory;
13 import org.simantics.application.arguments.IArguments;
14 import org.simantics.application.arguments.SimanticsArguments;
15 import org.simantics.scl.osgi.SCLOsgi;
17 public class TestSCLOsgi {
18 private static IProgressMonitor progress = new NullProgressMonitor();
21 public static void setupDatabase() throws PlatformException {
22 String[] args = new String[0];
23 IArgumentFactory<?>[] accepted = {
24 SimanticsArguments.RECOVERY_POLICY_FIX_ERRORS,
25 SimanticsArguments.ONTOLOGY_RECOVERY_POLICY_REINSTALL,
26 SimanticsArguments.SERVER,
27 SimanticsArguments.LOCAL_SERVER_PORT,
29 IArguments arguments = Arguments.parse(args, accepted);
30 Simantics.setDefaultDatabaseDriver("acorn");
31 Simantics.startUpHeadless(arguments, progress);
35 public static void teardownDatabase() throws PlatformException {
36 Simantics.shutdown(progress);
40 public void testDataJsonExists() {
41 String possibleError = SCLOsgi.compileAllModules();
42 if(possibleError != null) {
43 Assert.fail(possibleError);