Skip to content

Commit

Permalink
adds additional unit test.
Browse files Browse the repository at this point in the history
Signed-off-by: Juergen Albert <[email protected]>
  • Loading branch information
juergen-albert committed Sep 16, 2024
1 parent f7f8fe1 commit 0e5ff50
Show file tree
Hide file tree
Showing 13 changed files with 509 additions and 1 deletion.
16 changes: 16 additions & 0 deletions org.gecko.emf.osgi.codegen/test-resources/ws-2/cnf/build.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-plugin.2.DIM: \
aQute.bnd.repository.maven.provider.MavenBndRepository; \
snapshotUrl=https://devel.data-in-motion.biz/nexus/repository/dim-snapshot/; \
releaseUrl=https://devel.data-in-motion.biz/nexus/repository/maven-releases/; \
index=${.}/dim-uml.mvn; \
readOnly=true; \
poll.time=-1; \
name="DIM UML2"
-plugin.3.Central: \
aQute.bnd.repository.maven.provider.MavenBndRepository; \
snapshotUrl="https://oss.sonatype.org/content/repositories/snapshots/"; \
releaseUrl=https://repo.maven.apache.org/maven2/; \
index=${.}/central.mvn; \
readOnly=true; \
poll.time=-1; \
name="Central"
101 changes: 101 additions & 0 deletions org.gecko.emf.osgi.codegen/test-resources/ws-2/cnf/central.mvn
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
biz.aQute:biz.aQute.gogo.commands.provider:1.9.0
biz.aQute:biz.aQute.wrapper.hamcrest:1.9.0

biz.aQute.bnd:biz.aQute.bnd:7.0.0
biz.aQute.bnd:aQute.libg:7.0.0
biz.aQute.bnd:biz.aQute.bndlib:7.0.0
biz.aQute.bnd:biz.aQute.bnd.javagen:7.0.0
biz.aQute.bnd:biz.aQute.bnd.annotation:7.0.0
biz.aQute.bnd:biz.aQute.bnd.util:7.0.0

org.apache.felix:org.apache.felix.cm.json:2.0.0
org.apache.felix:org.apache.felix.configadmin:1.9.26
org.apache.felix:org.apache.felix.configurator:1.0.18
org.apache.felix:org.apache.felix.converter:1.0.18
org.apache.felix:org.apache.felix.coordinator:1.0.2
org.apache.felix:org.apache.felix.gogo.command:1.1.2
org.apache.felix:org.apache.felix.gogo.shell:1.1.4
org.apache.felix:org.apache.felix.log.extension:1.0.0
org.apache.felix:org.apache.felix.metatype:1.2.4
org.apache.felix:org.apache.felix.scr:2.2.6
org.apache.felix:org.apache.felix.shell.remote:1.2.0
org.apache.felix:org.apache.felix.threaddump:1.0.0
org.apache.felix:org.apache.felix.useradmin:1.0.4
org.apache.felix:org.apache.felix.eventadmin:1.6.4
org.apache.felix:org.apache.felix.fileinstall:3.7.4
org.apache.felix:org.apache.felix.framework:7.0.5
org.apache.felix:org.apache.felix.framework.security:2.8.3
org.apache.felix:org.apache.felix.gogo.runtime:1.1.6
org.apache.felix:org.apache.felix.inventory:1.1.0
org.apache.felix:org.apache.felix.log:1.2.6

org.apache.sling:org.apache.sling.commons.johnzon:1.2.14

org.eclipse.emf:org.eclipse.emf.codegen:2.23.0
org.eclipse.emf:org.eclipse.emf.codegen.ecore:2.33.0
org.eclipse.emf:org.eclipse.emf.common:2.29.0
org.eclipse.emf:org.eclipse.emf.ecore:2.35.0
org.eclipse.emf:org.eclipse.emf.ecore.xcore.lib:1.7.0
org.eclipse.emf:org.eclipse.emf.ecore.xmi:2.36.0
org.eclipse.emf:org.eclipse.emf.mapping.ecore2xml:2.13.0

org.osgi:org.osgi.annotation.versioning:1.1.2
org.osgi:org.osgi.annotation.bundle:2.0.0
org.osgi:org.osgi.dto:1.1.1
org.osgi:org.osgi.framework:1.10.0
org.osgi:org.osgi.jmx:1.1.0
org.osgi:org.osgi.namespace.contract:1.0.0
org.osgi:org.osgi.namespace.extender:1.0.1
org.osgi:org.osgi.namespace.implementation:1.0.0
org.osgi:org.osgi.namespace.service:1.0.0
org.osgi:org.osgi.namespace.unresolvable:1.0.0
org.osgi:org.osgi.resource:1.0.1
org.osgi:org.osgi.service.application:1.1.0
org.osgi:org.osgi.service.async:1.0.0
org.osgi:org.osgi.service.blueprint:1.0.2
org.osgi:org.osgi.service.clusterinfo:1.0.0
org.osgi:org.osgi.service.condpermadmin:1.1.2
org.osgi:org.osgi.service.condition:1.0.0
org.osgi:org.osgi.service.coordinator:1.0.2
org.osgi:org.osgi.service.log:1.5.0
org.osgi:org.osgi.service.packageadmin:1.2.1
org.osgi:org.osgi.service.prefs:1.1.2
org.osgi:org.osgi.service.repository:1.1.0
org.osgi:org.osgi.service.resolver:1.1.1
org.osgi:org.osgi.service.serviceloader:1.0.0
org.osgi:org.osgi.service.url:1.0.1
org.osgi:org.osgi.service.cm:1.6.1
org.osgi:org.osgi.service.configurator:1.0.1
org.osgi:org.osgi.service.event:1.4.1
org.osgi:org.osgi.service.metatype:1.4.1
org.osgi:org.osgi.service.metatype.annotations:1.4.1
org.osgi:org.osgi.service.useradmin:1.1.1
org.osgi:org.osgi.service.component:1.5.1
org.osgi:org.osgi.service.component.annotations:1.5.1
org.osgi:org.osgi.util.converter:1.0.9
org.osgi:org.osgi.util.function:1.2.0
org.osgi:org.osgi.util.tracker:1.5.4
org.osgi:org.osgi.util.promise:1.3.0
org.osgi:org.osgi.util.pushstream:1.1.0
org.osgi:osgi.annotation:8.1.0

org.slf4j:slf4j-simple:1.7.36
org.slf4j:slf4j-api:1.7.36

org.eclipse.platform:org.eclipse.core.contenttype:3.9.100
org.eclipse.platform:org.eclipse.core.expressions:3.9.100
org.eclipse.platform:org.eclipse.core.filesystem:1.10.100
org.eclipse.platform:org.eclipse.core.jobs:3.15.0
org.eclipse.platform:org.eclipse.core.resources:3.19.100
org.eclipse.platform:org.eclipse.core.runtime:3.29.0
org.eclipse.platform:org.eclipse.equinox.common:3.18.100
org.eclipse.platform:org.eclipse.equinox.preferences:3.10.300
org.eclipse.platform:org.eclipse.equinox.registry:3.11.300
org.eclipse.platform:org.eclipse.equinox.supplement:1.10.700
#org.eclipse.jdt:org.eclipse.jdt.core:3.35.0
org.eclipse.jdt:org.eclipse.jdt.core:3.26.0
org.eclipse.platform:org.eclipse.osgi:3.18.500
org.eclipse.platform:org.eclipse.text:3.13.100
org.geckoprojects.bnd:org.gecko.bnd.dimc.library:1.5.0
org.geckoprojects.bnd:org.gecko.bnd.jacoco.library:1.5.0
org.geckoprojects.bnd:org.gecko.bnd.osgitest.library:1.5.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
org.eclipse.uml2:org.eclipse.uml2.common:2.5.0
org.eclipse.uml2:org.eclipse.uml2.types:2.5.0
org.eclipse.uml2:org.eclipse.uml2.uml:5.5.0
org.eclipse.uml2:org.eclipse.uml2:5.5.3
org.eclipse.uml2:org.eclipse.uml2.uml.profile.standard:1.5.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
</classpathentry>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="src" output="bin_test" path="test">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/bin/
/bin_test/
/generated/
/src-gen/
/err.log
/out.log
/1.log
/2.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gecko.emf.osgi.example.model.basic</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>bndtools.core.bndbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>bndtools.core.bndnature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eclipse.preferences.version=1
encoding//.settings/org.eclipse.core.resources.prefs=windows-1252
encoding//src/test/component/Example.java=UTF-8
encoding//test/test/component/ExampleTest.java=UTF-8
encoding/<project>=UTF-8
encoding/bnd.bnd=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
content_assist_proposals_background=255,255,255
content_assist_proposals_foreground=0,0,0
eclipse.preferences.version=1
org.eclipse.jdt.ui.formatterprofiles.version=13
org.eclipse.jdt.ui.javadoc=true
spelling_locale_initialized=true
useAnnotationsPrefPage=true
useQuickDiffPrefPage=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
src=${^src},src-gen

-buildpath: \
org.eclipse.emf.ecore;version=latest,\
org.eclipse.emf.common;version=latest,\
org.eclipse.emf.ecore.xmi;version=latest,\
org.osgi.annotation.bundle;version=latest,\
org.osgi.annotation.versioning;version=latest,\
org.osgi.service.component.annotations;version=latest,\
org.osgi.service.condition;version=latest,\
org.osgi.framework;version=latest

-includeresource.model: model=other/main/resources/model

#-dependson: org.gecko.emf.osgi.codegen

#-generate:\
# other/main/resources/model/basic.genmodel;\
# generate="geckoEMF";\
# genmodel=other/main/resources/model/basic.genmodel;\
# output=src-gen;\
# version=${base-version};\
# clean=false;\
# logfile=out.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="basic" nsURI="http://gecko.org/example/model/basic" nsPrefix="basic">
<eAnnotations source="Version">
<details key="value" value="1.5"/>
</eAnnotations>
<eAnnotations source="SuppressWarnings" references="#//SuppressWarnings">
<details key="value" value="&quot;Blub&quot;"/>
</eAnnotations>
<eClassifiers xsi:type="ecore:EClass" name="Person">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="contact" upperBound="-1"
eType="#//Contact" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="address" eType="#//Address"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="gender" eType="#//GenderType"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="tags" upperBound="-1" eType="#//Tag"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
iD="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1"
eType="#//StringStringMap" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="bigInt" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigInteger"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="bigDec" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigDecimal"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="image" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EByteArray"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="relatives" upperBound="-1"
eType="#//Person"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="transientAddress" eType="#//Address"
transient="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="test" eType="ecore:EDataType ../../../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Address">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="street" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="city" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="zip" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
iD="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="npe" eType="#//NPE"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Contact">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//ContactType"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="context" eType="#//ContactContextType"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="ContactType">
<eLiterals name="PHONE" literal="Phone"/>
<eLiterals name="MOBILE" value="1" literal="Mobile"/>
<eLiterals name="WHATSAPP" value="2" literal="WhatsApp"/>
<eLiterals name="EMAIL" value="3" literal="Email"/>
<eLiterals name="SKYPE" value="4" literal="Skype"/>
<eLiterals name="WEBADDRESS" value="5" literal="WWW"/>
<eLiterals name="nööö" value="6"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="ContactContextType">
<eLiterals name="HOME"/>
<eLiterals name="PRIVATE" value="1"/>
<eLiterals name="WORK" value="2"/>
<eLiterals name="T_E_S_T" value="3"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Family">
<eStructuralFeatures xsi:type="ecore:EReference" name="father" eType="#//Person"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="mother" eType="#//Person"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
eType="#//Person"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
iD="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="BusinessContact" eSuperTypes="#//Contact">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="companyName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="GenderType">
<eLiterals name="FEMALE"/>
<eLiterals name="MALE" value="1"/>
<eLiterals name="OTHER" value="2"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Tag">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="tag" eType="#//Tag" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="tags" upperBound="-1" eType="#//Tag"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="desc"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="BusinessPerson" eSuperTypes="#//Person">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="companyIdCardNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="compId"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="employeeInfo" upperBound="-1"
eType="#//EmployeeInfo" containment="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="eInfo"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="StringStringMap" instanceClassName="java.util.Map$Entry">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="key" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="NPE" instanceClassName="java.lang.NullPointerException"/>
<eClassifiers xsi:type="ecore:EClass" name="EmployeeInfo">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="position" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Widget">
<eStructuralFeatures xsi:type="ecore:EReference" name="content" eType="#//Content"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
iD="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Textwidget" eSuperTypes="#//Content"/>
<eClassifiers xsi:type="ecore:EClass" name="Content">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="HLWidget" eSuperTypes="#//Content">
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
eType="#//Widget" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PersonContact" eSuperTypes="#//Contact">
<eStructuralFeatures xsi:type="ecore:EReference" name="contactPerson" eType="#//Person"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PersonObject">
<eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass ../../../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
iD="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Geometry">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="coordinates" upperBound="-1"
eType="#//Coordinates"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
iD="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="multiDimensionalCoordinates"
upperBound="-1" eType="#//MultiDimensionCoordinates"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="Coordinates" instanceClassName="java.lang.Double[]"/>
<eClassifiers xsi:type="ecore:EDataType" name="MultiDimensionCoordinates" instanceClassName="java.lang.Double[][]"/>
<eClassifiers xsi:type="ecore:EClass" name="SuppressWarnings" instanceClassName="java.lang.SuppressWarnings"
abstract="true" interface="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" upperBound="-1"
eType="ecore:EDataType ../../../../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
</eClassifiers>
</ecore:EPackage>
Loading

0 comments on commit 0e5ff50

Please sign in to comment.