diff --git a/bundles/org.eclipse.vorto.editor.infomodel.tests/META-INF/MANIFEST.MF b/bundles/org.eclipse.vorto.editor.infomodel.tests/META-INF/MANIFEST.MF index 95badfed45..119f644f8e 100644 --- a/bundles/org.eclipse.vorto.editor.infomodel.tests/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.vorto.editor.infomodel.tests/META-INF/MANIFEST.MF @@ -1,31 +1,32 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Vorto Information Model Editor Tests (Incubation) -Bundle-Vendor: Eclipse.org/Vorto -Bundle-Version: 0.4.0.qualifier -Bundle-SymbolicName: org.eclipse.vorto.editor.infomodel.tests;singleton:=true -Bundle-ActivationPolicy: lazy -Require-Bundle: org.eclipse.vorto.editor.infomodel, - org.eclipse.vorto.editor.infomodel.ui, - org.eclipse.core.runtime, - org.eclipse.xtext.junit4, - org.eclipse.ui.workbench;resolution:=optional, - org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional, - org.eclipse.xtext, - org.eclipse.xtext.xbase, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtext.ui, - org.eclipse.vorto.core -Import-Package: org.apache.log4j, - org.eclipse.xtext.formatting, - org.eclipse.xtext.junit.util;resolution:=optional, - org.hamcrest.core, - org.junit;version="4.5.0", - org.junit.runner;version="4.5.0", - org.junit.runner.manipulation;version="4.5.0", - org.junit.runner.notification;version="4.5.0", - org.junit.runners;version="4.5.0", - org.junit.runners.model;version="4.5.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Bundle-ClassPath: resources/,. -Export-Package: org.eclipse.vorto.editor.infomodel +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Vorto Information Model Editor Tests (Incubation) +Bundle-Vendor: Eclipse.org/Vorto +Bundle-Version: 0.4.0.qualifier +Bundle-SymbolicName: org.eclipse.vorto.editor.infomodel.tests;singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.vorto.editor.infomodel, + org.eclipse.vorto.editor.infomodel.ui, + org.eclipse.core.runtime, + org.eclipse.xtext.junit4, + org.eclipse.ui.workbench;resolution:=optional, + org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional, + org.eclipse.xtext, + org.eclipse.xtext.xbase, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtext.ui, + org.eclipse.vorto.core +Import-Package: org.apache.log4j, + org.eclipse.xtext.formatting, + org.eclipse.xtext.junit.util;resolution:=optional, + org.hamcrest.core, + org.junit;version="4.5.0", + org.junit.runner;version="4.5.0", + org.junit.runner.manipulation;version="4.5.0", + org.junit.runner.notification;version="4.5.0", + org.junit.runners;version="4.5.0", + org.junit.runners.model;version="4.5.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-ClassPath: resources/,. +Export-Package: org.eclipse.vorto.editor.infomodel.tests + diff --git a/bundles/org.eclipse.vorto.editor.infomodel.tests/src/org/eclipse/vorto/editor/infomodel/tests/InformationModelParsingTest.xtend b/bundles/org.eclipse.vorto.editor.infomodel.tests/src/org/eclipse/vorto/editor/infomodel/tests/InformationModelParsingTest.xtend new file mode 100644 index 0000000000..3c1f2a0970 --- /dev/null +++ b/bundles/org.eclipse.vorto.editor.infomodel.tests/src/org/eclipse/vorto/editor/infomodel/tests/InformationModelParsingTest.xtend @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2014 Bosch Software Innovations GmbH and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * http://www.eclipse.org/legal/epl-v10.html + * The Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Bosch Software Innovations GmbH - Please refer to git log + * + *******************************************************************************/ +/* + * generated by Xtext + */ +package org.eclipse.vorto.editor.infomodel.tests + +import com.google.inject.Inject +import org.eclipse.vorto.core.api.model.informationmodel.InformationModel +import org.eclipse.xtext.junit4.InjectWith +import org.eclipse.xtext.junit4.XtextRunner +import org.eclipse.xtext.junit4.util.ParseHelper +import org.junit.Assert +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(XtextRunner) +@InjectWith(InformationModelInjectorProvider) +class InformationModelParsingTest{ + + @Inject + ParseHelper parseHelper; + + @Test + def void loadModel() { + val result = parseHelper.parse(''' + Hello Xtext! + ''') + Assert.assertNotNull(result) + } + +} diff --git a/bundles/org.eclipse.vorto.editor.infomodel.tests/src/org/eclipse/vorto/editor/infomodel/tests/formatter/InfoModellFormatterTest.xtend b/bundles/org.eclipse.vorto.editor.infomodel.tests/src/org/eclipse/vorto/editor/infomodel/tests/formatter/InfoModellFormatterTest.xtend index 26e213a995..7546afafbd 100644 --- a/bundles/org.eclipse.vorto.editor.infomodel.tests/src/org/eclipse/vorto/editor/infomodel/tests/formatter/InfoModellFormatterTest.xtend +++ b/bundles/org.eclipse.vorto.editor.infomodel.tests/src/org/eclipse/vorto/editor/infomodel/tests/formatter/InfoModellFormatterTest.xtend @@ -18,7 +18,6 @@ package org.eclipse.vorto.editor.infomodel.tests.formatter import com.google.inject.Inject import org.eclipse.vorto.core.api.model.informationmodel.InformationModel import org.eclipse.vorto.core.api.model.informationmodel.impl.InformationModelPackageImpl -import org.eclipse.vorto.editor.infomodel.InformationModelInjectorProvider import org.eclipse.xtext.formatting.INodeModelFormatter import org.eclipse.xtext.junit4.util.ParseHelper import org.eclipse.xtext.junit4.AbstractXtextTests @@ -28,6 +27,7 @@ import org.eclipse.xtext.resource.XtextResource import org.junit.BeforeClass import org.junit.Test import org.junit.runner.RunWith +import org.eclipse.vorto.editor.infomodel.tests.InformationModelInjectorProvider @RunWith(typeof(XtextRunner)) @InjectWith(typeof(InformationModelInjectorProvider)) diff --git a/bundles/org.eclipse.vorto.editor.infomodel/pom.xml b/bundles/org.eclipse.vorto.editor.infomodel/pom.xml index adaa5f4c98..ff928a4be6 100644 --- a/bundles/org.eclipse.vorto.editor.infomodel/pom.xml +++ b/bundles/org.eclipse.vorto.editor.infomodel/pom.xml @@ -103,6 +103,12 @@ **/* + + ${basedir}/../org.eclipse.vorto.editor.informationmodel.tests/src-gen/ + + **/* + + ${basedir}/model/generated/ diff --git a/bundles/org.eclipse.vorto.editor.infomodel/src/org/eclipse/vorto/editor/infomodel/GenerateInformationModel.mwe2 b/bundles/org.eclipse.vorto.editor.infomodel/src/org/eclipse/vorto/editor/infomodel/GenerateInformationModel.mwe2 index 0c99cc01db..5ebb73e7f1 100644 --- a/bundles/org.eclipse.vorto.editor.infomodel/src/org/eclipse/vorto/editor/infomodel/GenerateInformationModel.mwe2 +++ b/bundles/org.eclipse.vorto.editor.infomodel/src/org/eclipse/vorto/editor/infomodel/GenerateInformationModel.mwe2 @@ -38,6 +38,9 @@ Workflow { } web = { enabled = true + } + runtimeTest = { + enabled = true } createEclipseMetaData = true }