Skip to content

Commit

Permalink
Added runtime test module for Information model
Browse files Browse the repository at this point in the history
Signed-off-by: shiv12095 <shiv12095@iiitd.ac.in>
  • Loading branch information
shiv12095 committed Jun 7, 2016
1 parent 7738680 commit 3edd1a6
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 32 deletions.
@@ -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

@@ -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<InformationModel> parseHelper;

@Test
def void loadModel() {
val result = parseHelper.parse('''
Hello Xtext!
''')
Assert.assertNotNull(result)
}

}
Expand Up @@ -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
Expand All @@ -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))
Expand Down
6 changes: 6 additions & 0 deletions bundles/org.eclipse.vorto.editor.infomodel/pom.xml
Expand Up @@ -103,6 +103,12 @@
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.eclipse.vorto.editor.informationmodel.tests/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/model/generated/</directory>
</fileset>
Expand Down
Expand Up @@ -38,6 +38,9 @@ Workflow {
}
web = {
enabled = true
}
runtimeTest = {
enabled = true
}
createEclipseMetaData = true
}
Expand Down

0 comments on commit 3edd1a6

Please sign in to comment.