Skip to content

Commit

Permalink
Updated osgi tests package to be com.github.dozermapper.osgitests (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
garethahealy authored Jul 6, 2017
1 parent 08014ab commit 485aff9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.osgitests;
package com.github.dozermapper.osgitests;

import javax.inject.Inject;

import com.github.dozermapper.osgitestsmodel.Person;

import org.dozer.DozerBeanMapperBuilder;
import org.dozer.Mapper;
import org.dozer.osgi.Activator;
import org.dozer.osgi.OSGiClassLoader;
import org.dozer.osgitestsmodel.Person;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
Expand Down Expand Up @@ -74,7 +75,7 @@ public void canGetBundleFromDozerCore() {
public void canConstructDozerBeanMapper() {
Mapper mapper = DozerBeanMapperBuilder.create()
.withMappingFiles("mappings/mapping.xml")
.withClassLoader(new OSGiClassLoader(org.dozer.osgitestsmodel.Activator.getBundleContext()))
.withClassLoader(new OSGiClassLoader(com.github.dozermapper.osgitestsmodel.Activator.getBundleContext()))
.build();

assertNotNull(mapper);
Expand All @@ -84,7 +85,7 @@ public void canConstructDozerBeanMapper() {
public void canMap() {
Mapper mapper = DozerBeanMapperBuilder.create()
.withMappingFiles("mappings/mapping.xml")
.withClassLoader(new OSGiClassLoader(org.dozer.osgitestsmodel.Activator.getBundleContext()))
.withClassLoader(new OSGiClassLoader(com.github.dozermapper.osgitestsmodel.Activator.getBundleContext()))
.build();

Person answer = mapper.map(new Person("bob"), Person.class);
Expand All @@ -98,7 +99,7 @@ public void canMap() {
public void canMapUsingXML() {
Mapper mapper = DozerBeanMapperBuilder.create()
.withMappingFiles("mappings/mapping.xml")
.withClassLoader(new OSGiClassLoader(org.dozer.osgitestsmodel.Activator.getBundleContext()))
.withClassLoader(new OSGiClassLoader(com.github.dozermapper.osgitestsmodel.Activator.getBundleContext()))
.build();

Person answer = mapper.map(new Person("bob"), Person.class);
Expand Down
4 changes: 2 additions & 2 deletions osgi-test/src/test/resources/mappings/mapping.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">

<mapping>
<class-a>org.dozer.osgitestsmodel.Person</class-a>
<class-b>org.dozer.osgitestsmodel.Person</class-b>
<class-a>com.github.dozermapper.osgitestsmodel.Person</class-a>
<class-b>com.github.dozermapper.osgitestsmodel.Person</class-b>
<field>
<a>name</a>
<b>name</b>
Expand Down
4 changes: 2 additions & 2 deletions osgi-tests-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<instructions>
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Bundle-Activator> org.dozer.osgitestsmodel.Activator</Bundle-Activator>
<Export-Package>org.dozer.osgitestsmodel.*;version=${project.version}</Export-Package>
<Bundle-Activator>com.github.dozermapper.osgitestsmodel.Activator</Bundle-Activator>
<Export-Package>com.github.dozermapper.osgitestsmodel.*;version=${project.version}</Export-Package>
<Import-Package>*</Import-Package>
<Implementation-Title>${project.name}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.osgitestsmodel;
package com.github.dozermapper.osgitestsmodel;

import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.osgitestsmodel;
package com.github.dozermapper.osgitestsmodel;

public class Person {

Expand Down

0 comments on commit 485aff9

Please sign in to comment.