getFieldDescriptors(Message.Builder protoBuilder) {
- return protoBuilder.getDescriptorForType().getFields();
- }
-
- /**
- * Gets a {@link Descriptors.FieldDescriptor} associated with the clazz, which matches the fieldName,
- * either with an exact match, or after applying a transformation to camel-case.
- *
- * Returns null if there is no match.
- *
- * @param clazz {@link Message} clazz
- * @param fieldName fieldName to find
- * @return {@link Descriptors.FieldDescriptor} associated with the clazz and which matches the fieldName
- */
- public static Descriptors.FieldDescriptor getFieldDescriptor(Class extends Message> clazz, String fieldName) {
- final List protoFieldDescriptors = getFieldDescriptors(clazz);
-
- for (Descriptors.FieldDescriptor descriptor : protoFieldDescriptors) {
- if (sameField(fieldName, descriptor.getName())) {
- return descriptor;
- }
- }
-
- return null;
- }
-
- private static boolean sameField(String fieldName, String protoFieldName) {
- if (fieldName.equals(protoFieldName)) {
- return true;
- }
-
- // Try to compare field name with Protobuf official snake case syntax
- return fieldName.equals(toCamelCase(protoFieldName));
- }
-
- /**
- * Gets the field value from the {@link Message}, which matches the fieldName,
- * either with an exact match, or after applying a transformation to camel-case.
- *
- * Returns null if there is no match.
- *
- * @param message {@link Message} instance
- * @param fieldName fieldName to find
- * @return field value from the {@link Message} for the specified field name, or null if none found
- */
- public static Object getFieldValue(Object message, String fieldName) {
- Object answer = null;
-
- Map fieldsMap = ((Message)message).getAllFields();
- for (Map.Entry field : fieldsMap.entrySet()) {
- if (sameField(fieldName, field.getKey().getName())) {
- if (field.getKey().isMapField()) {
- // Capitalize the first letter of the string;
- String propertyName = Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1);
- String methodName = String.format("get%sMap", propertyName);
-
- try {
- Method mapGetter = message.getClass().getMethod(methodName);
- answer = mapGetter.invoke(message);
- break;
- } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
- throw new MappingException("Could not introspect map field with method " + methodName, e);
- }
- } else {
- answer = field.getValue();
- break;
- }
- }
- }
-
- return answer;
- }
-
- /**
- * Gets the class type of the {@link Descriptors.FieldDescriptor}
- *
- * @param descriptor {@link Descriptors.FieldDescriptor} instance
- * @param beanContainer {@link BeanContainer} instance
- * @return class type of the {@link Descriptors.FieldDescriptor}
- */
- public static Class> getJavaClass(final Descriptors.FieldDescriptor descriptor, BeanContainer beanContainer) {
- if (descriptor.isMapField()) {
- return Map.class;
- }
-
- if (descriptor.isRepeated()) {
- return List.class;
- }
-
- return getJavaClassIgnoreRepeated(descriptor, beanContainer);
- }
-
- /**
- * Gets the class type of the {@link Descriptors.FieldDescriptor}
- *
- * @param descriptor {@link Descriptors.FieldDescriptor} instance
- * @param beanContainer {@link BeanContainer} instance
- * @return class type of the {@link Descriptors.FieldDescriptor} or null, if {@link Descriptors.FieldDescriptor#isRepeated()}
- */
- public static Class> getJavaGenericClassForCollection(final Descriptors.FieldDescriptor descriptor, BeanContainer beanContainer) {
- if (!descriptor.isRepeated()) {
- return null;
- }
-
- return getJavaClassIgnoreRepeated(descriptor, beanContainer);
- }
-
- private static Class> getJavaClassIgnoreRepeated(final Descriptors.FieldDescriptor descriptor, BeanContainer beanContainer) {
- switch (descriptor.getJavaType()) {
- case INT:
- return Integer.class;
- case LONG:
- return Long.class;
- case FLOAT:
- return Float.class;
- case DOUBLE:
- return Double.class;
- case BOOLEAN:
- return Boolean.class;
- case STRING:
- return String.class;
- case BYTE_STRING:
- return ByteString.class;
- //code duplicate, but GenericDescriptor interface is private in protobuf
- case ENUM:
- return getEnumClassByEnumDescriptor(descriptor.getEnumType(), beanContainer);
- case MESSAGE:
- return MappingUtils.loadClass(StringUtils.join(
- getFullyQualifiedClassName(descriptor.getMessageType().getContainingType(),
- descriptor.getMessageType().getFile().getOptions(),
- descriptor.getMessageType().getName()), '.'), beanContainer);
- default:
- throw new MappingException("Unable to find " + descriptor.getJavaType());
- }
- }
-
- private static String[] getFullyQualifiedClassName(Descriptors.Descriptor container, final FileOptions fileOpts, String name) {
-
- if (fileOpts.getJavaMultipleFiles()) {
- LinkedList fqnSegments = new LinkedList<>();
- fqnSegments.push(name);
- while (container != null) {
- fqnSegments.push(container.getName());
- container = container.getContainingType();
- }
- fqnSegments.push(fileOpts.getJavaPackage());
- return fqnSegments.toArray(new String[] {});
- }
-
- return new String[] {fileOpts.getJavaPackage(), fileOpts.getJavaOuterClassname(), name};
- }
-
- @SuppressWarnings("unchecked")
- private static Class extends Enum> getEnumClassByEnumDescriptor(Descriptors.EnumDescriptor descriptor, BeanContainer beanContainer) {
- String name = StringUtils.join(getFullyQualifiedClassName(descriptor.getContainingType(), descriptor.getFile().getOptions(), descriptor.getName()), '.');
- return (Class extends Enum>)MappingUtils.loadClass(name, beanContainer);
- }
-
- /**
- * Wrap {@link ProtocolMessageEnum} or a {@link List} to a {@link Descriptors.EnumValueDescriptor}
- * If the value is neither {@link ProtocolMessageEnum} or a {@link List}, the value is returned.
- *
- * @param value {@link ProtocolMessageEnum} or a {@link List}
- * @return {@link Descriptors.EnumValueDescriptor} if value is {@link ProtocolMessageEnum}, else a {@link List} of {@link Descriptors.EnumValueDescriptor}
- */
- @SuppressWarnings("unchecked")
- public static Object wrapEnums(Object value) {
- if (value instanceof ProtocolMessageEnum) {
- return ((ProtocolMessageEnum)value).getValueDescriptor();
- }
-
- // There is no other collections using in proto, only list
- if (value instanceof List) {
- List modifiedList = new ArrayList(((List)value).size());
- for (Object element : (List)value) {
- modifiedList.add(wrapEnums(element));
- }
-
- return modifiedList;
- }
-
- return value;
- }
-
- /**
- * Unwrap {@link Descriptors.EnumValueDescriptor} or a {@link Collection} to a raw {@link Enum}
- * If the value is neither {@link Descriptors.EnumValueDescriptor} or a {@link Collection}, the value is returned.
- *
- * @param value {@link Descriptors.EnumValueDescriptor} or a {@link Collection}
- * @param beanContainer {@link BeanContainer} instance
- * @return {@link Enum} if value is {@link Descriptors.EnumValueDescriptor}, else a {@link Collection} of {@link Enum}
- */
- @SuppressWarnings("unchecked")
- public static Object unwrapEnums(Object value, BeanContainer beanContainer) {
- if (value instanceof Descriptors.EnumValueDescriptor) {
- Descriptors.EnumValueDescriptor descriptor = (Descriptors.EnumValueDescriptor)value;
- Class extends Enum> enumClass = getEnumClassByEnumDescriptor(descriptor.getType(), beanContainer);
-
- for (Enum enumValue : enumClass.getEnumConstants()) {
- if (((Descriptors.EnumValueDescriptor)value).getName().equals(enumValue.name())) {
- return enumValue;
- }
- }
-
- return null;
- }
-
- if (value instanceof Collection) {
- Collection valueCollection = (Collection)value;
- List modifiedList = new ArrayList(valueCollection.size());
-
- for (Object element : valueCollection) {
- modifiedList.add(unwrapEnums(element, beanContainer));
- }
-
- return modifiedList;
- }
-
- return value;
- }
-
- /**
- * Converts name to CamelCase
- *
- * @param name name to convert
- * @return converted name to CamelCase
- */
- public static String toCamelCase(String name) {
- return CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, name);
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/main/java/com/github/dozermapper/protobuf/util/package-info.java b/dozer-integrations/dozer-proto3/src/main/java/com/github/dozermapper/protobuf/util/package-info.java
deleted file mode 100644
index c53606ce3..000000000
--- a/dozer-integrations/dozer-proto3/src/main/java/com/github/dozermapper/protobuf/util/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Utility classes which make it easier to work with Protobuf
- */
-package com.github.dozermapper.protobuf.util;
diff --git a/dozer-integrations/dozer-proto3/src/main/resources/META-INF/LICENSE b/dozer-integrations/dozer-proto3/src/main/resources/META-INF/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/dozer-integrations/dozer-proto3/src/main/resources/META-INF/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/dozer-integrations/dozer-proto3/src/main/resources/META-INF/services/com.github.dozermapper.core.DozerModule b/dozer-integrations/dozer-proto3/src/main/resources/META-INF/services/com.github.dozermapper.core.DozerModule
deleted file mode 100644
index eb31d69cc..000000000
--- a/dozer-integrations/dozer-proto3/src/main/resources/META-INF/services/com.github.dozermapper.core.DozerModule
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright 2005-2018 Dozer Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-com.github.dozermapper.protobuf.ProtobufSupportModule
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/functional_tests/ProtoBeansDeepMappingTest.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/functional_tests/ProtoBeansDeepMappingTest.java
deleted file mode 100644
index ca550a3cc..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/functional_tests/ProtoBeansDeepMappingTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.functional_tests;
-
-import java.util.Arrays;
-
-import com.github.dozermapper.core.DozerBeanMapperBuilder;
-import com.github.dozermapper.core.Mapper;
-import com.github.dozermapper.protobuf.vo.proto.LiteTestObject;
-import com.github.dozermapper.protobuf.vo.proto.LiteTestObjectContainer;
-import com.github.dozermapper.protobuf.vo.proto.ObjectWithCollection;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoTestObjectWithNestedProtoObject;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollection;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollectionContainer;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObject;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-public class ProtoBeansDeepMappingTest {
-
- private static Mapper mapper;
-
- @BeforeClass
- public static void setUp() {
- mapper = DozerBeanMapperBuilder.create()
- .withMappingFiles("mappings/protoSrcDeepBeansMapping.xml")
- .build();
- }
-
- @Test
- public void canSrcCopySimpleOneLevelField() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder.setOne("smthOne");
-
- ProtoTestObjectWithNestedProtoObject.Builder protoTestObjectWithNestedProtoObjectBuilder = ProtoTestObjectWithNestedProtoObject.newBuilder();
- protoTestObjectWithNestedProtoObjectBuilder.setNestedObject(simpleProtoTestObjectBuilder);
- protoTestObjectWithNestedProtoObjectBuilder.setOne("smthAnother-neverMind");
-
- ProtoTestObjectWithNestedProtoObject protoTestObjectWithNestedProtoObject = protoTestObjectWithNestedProtoObjectBuilder.build();
-
- LiteTestObject result = mapper.map(protoTestObjectWithNestedProtoObject, LiteTestObject.class);
-
- assertNotNull(result);
- assertNotNull(result.getOne());
- assertEquals(protoTestObjectWithNestedProtoObject.getNestedObject().getOne(), result.getOne());
- }
-
- @Test
- public void canSrcCopyFieldFromListElement() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder1 = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder1.setOne("smthAnother");
-
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder2 = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder2.setOne("smthOne");
-
- ProtobufWithSimpleCollection.Builder protobufWithSimpleCollectionBuilder = ProtobufWithSimpleCollection.newBuilder();
- protobufWithSimpleCollectionBuilder.addAllObject(Arrays.asList(simpleProtoTestObjectBuilder1.build(), simpleProtoTestObjectBuilder2.build()));
-
- ProtobufWithSimpleCollection protobufWithSimpleCollection = protobufWithSimpleCollectionBuilder.build();
-
- LiteTestObject result = mapper.map(protobufWithSimpleCollection, LiteTestObject.class);
-
- assertNotNull(result);
- assertNotNull(result.getOne());
- assertEquals(protobufWithSimpleCollection.getObject(1).getOne(), result.getOne());
- }
-
- @Test
- public void canSrcCopyList() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder1 = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder1.setOne("smthAnother");
-
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder2 = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder2.setOne("smthOne");
-
- ProtobufWithSimpleCollection.Builder protoWithCollectionBuilder = ProtobufWithSimpleCollection.newBuilder();
- protoWithCollectionBuilder.addAllObject(Arrays.asList(simpleProtoTestObjectBuilder1.build(), simpleProtoTestObjectBuilder2.build()));
-
- ProtobufWithSimpleCollectionContainer.Builder protobufWithSimpleCollectionContainerBuilder = ProtobufWithSimpleCollectionContainer.newBuilder();
- protobufWithSimpleCollectionContainerBuilder.setObject(protoWithCollectionBuilder);
-
- ProtobufWithSimpleCollectionContainer src = protobufWithSimpleCollectionContainerBuilder.build();
-
- ObjectWithCollection result = mapper.map(src, ObjectWithCollection.class);
-
- assertNotNull(result);
- assertNotNull(result.getObjects());
- assertEquals(2, result.getObjects().size());
- }
-
- @Test
- public void canSrcCopyListElement() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder1 = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder1.setOne("smthAnother");
-
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder2 = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder2.setOne("smthOne");
-
- ProtobufWithSimpleCollection.Builder builder = ProtobufWithSimpleCollection.newBuilder();
- builder.addAllObject(Arrays.asList(simpleProtoTestObjectBuilder1.build(), simpleProtoTestObjectBuilder2.build()));
-
- ProtobufWithSimpleCollection protobufWithSimpleCollection = builder.build();
-
- LiteTestObjectContainer result = mapper.map(protobufWithSimpleCollection, LiteTestObjectContainer.class);
-
- assertNotNull(result);
- assertNotNull(result.getObject());
- assertNotNull(result.getObject().getOne());
- assertEquals(protobufWithSimpleCollection.getObject(1).getOne(), result.getObject().getOne());
- }
-
- @Test
- public void canSrcCopyDeepListElement() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder1 = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder1.setOne("smthOne");
-
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder2 = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder2.setOne("smthAnother");
-
- ProtobufWithSimpleCollection.Builder protobufWithSimpleCollectionBuilder = ProtobufWithSimpleCollection.newBuilder();
- protobufWithSimpleCollectionBuilder.addAllObject(Arrays.asList(simpleProtoTestObjectBuilder1.build(), simpleProtoTestObjectBuilder2.build()));
-
- ProtobufWithSimpleCollectionContainer.Builder protobufWithSimpleCollectionContainerBuilder = ProtobufWithSimpleCollectionContainer.newBuilder();
- protobufWithSimpleCollectionContainerBuilder.setObject(protobufWithSimpleCollectionBuilder);
-
- ProtobufWithSimpleCollectionContainer protobufWithSimpleCollectionContainer = protobufWithSimpleCollectionContainerBuilder.build();
-
- LiteTestObjectContainer result = mapper.map(protobufWithSimpleCollectionContainer, LiteTestObjectContainer.class);
-
- assertNotNull(result);
- assertNotNull(result.getObject().getOne());
- assertEquals(protobufWithSimpleCollectionContainer.getObject().getObject(0).getOne(), result.getObject().getOne());
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/functional_tests/ProtoBeansMappingTest.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/functional_tests/ProtoBeansMappingTest.java
deleted file mode 100644
index e8f20abc3..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/functional_tests/ProtoBeansMappingTest.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.functional_tests;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-
-import com.github.dozermapper.core.DozerBeanMapperBuilder;
-import com.github.dozermapper.core.Mapper;
-import com.github.dozermapper.core.MappingException;
-import com.github.dozermapper.protobuf.vo.proto.FieldNaming;
-import com.github.dozermapper.protobuf.vo.proto.LiteTestObject;
-import com.github.dozermapper.protobuf.vo.proto.MapExample;
-import com.github.dozermapper.protobuf.vo.proto.ObjectWithCollection;
-import com.github.dozermapper.protobuf.vo.proto.ObjectWithEnumCollection;
-import com.github.dozermapper.protobuf.vo.proto.ObjectWithEnumField;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoEnum;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoObjectWithEnumField;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoTestObjectWithNestedProtoObject;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufFieldNaming;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufMapExample;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithEnumCollection;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollection;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObject;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObjectWithoutRequired;
-import com.github.dozermapper.protobuf.vo.proto.SimpleEnum;
-import com.github.dozermapper.protobuf.vo.proto.TestObject;
-import com.github.dozermapper.protobuf.vo.proto.TestObjectContainer;
-
-import org.hamcrest.core.IsInstanceOf;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-public class ProtoBeansMappingTest {
-
- private static Mapper mapper;
-
- @Rule
- public ExpectedException badMapToProtoExpectedException = ExpectedException.none();
-
- @Rule
- public ExpectedException badMapFromProtoExpectedException = ExpectedException.none();
-
- @BeforeClass
- public static void setUp() {
- mapper = DozerBeanMapperBuilder.create()
- .withMappingFiles("mappings/protoBeansMapping.xml")
- .build();
- }
-
- @Test
- public void canSimpleToProto() {
- TestObject testObject = new TestObject();
- testObject.setOne("ABC");
-
- SimpleProtoTestObject result = mapper.map(testObject, SimpleProtoTestObject.class);
-
- assertNotNull(result);
- assertNotNull(result.getOne());
- assertEquals(testObject.getOne(), result.getOne());
- }
-
- @Test
- public void canSimpleFromProto() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder.setOne("ABC");
-
- SimpleProtoTestObject simpleProtoTestObject = simpleProtoTestObjectBuilder.build();
-
- TestObject result = mapper.map(simpleProtoTestObject, TestObject.class);
-
- assertNotNull(result);
- assertNotNull(result.getOne());
- assertEquals(simpleProtoTestObject.getOne(), result.getOne());
- }
-
- @Test
- public void canSimpleWildcardToProto() {
- LiteTestObject liteTestObject = new LiteTestObject();
- liteTestObject.setOne("ABC");
-
- SimpleProtoTestObject result = mapper.map(liteTestObject, SimpleProtoTestObject.class);
-
- assertNotNull(result);
- assertNotNull(result.getOne());
- assertEquals("ABC", result.getOne());
- }
-
- @Test
- public void canSimpleWildcardFromProto() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder.setOne("ABC");
-
- LiteTestObject result = mapper.map(simpleProtoTestObjectBuilder.build(), LiteTestObject.class);
-
- assertNotNull(result);
- assertNotNull(result.getOne());
- assertEquals("ABC", result.getOne());
- }
-
- @Test
- public void canSimpleFromProtoWithNull() {
- SimpleProtoTestObjectWithoutRequired.Builder simpleProtoTestObjectWithoutRequiredBuilder = SimpleProtoTestObjectWithoutRequired.newBuilder();
- SimpleProtoTestObjectWithoutRequired simpleProtoTestObjectWithoutRequired = simpleProtoTestObjectWithoutRequiredBuilder.build();
-
- TestObject result = mapper.map(simpleProtoTestObjectWithoutRequired, TestObject.class);
-
- assertNotNull(result);
- assertNull(result.getOne());
- }
-
- @Test
- public void canSimpleToProtoWithNull() {
- TestObject testObject = new TestObject();
-
- SimpleProtoTestObjectWithoutRequired result = mapper.map(testObject, SimpleProtoTestObjectWithoutRequired.class);
-
- assertNotNull(result);
- assertNotNull(result.getOne());
- assertTrue(result.getOne().length() == 0);
- }
-
- @Test
- public void canNestedProtoFieldToProto() {
- TestObject testObject = new TestObject();
- testObject.setOne("InnerName");
-
- TestObjectContainer testObjectContainer = new TestObjectContainer(testObject, "Name");
-
- ProtoTestObjectWithNestedProtoObject result = mapper.map(testObjectContainer, ProtoTestObjectWithNestedProtoObject.class);
-
- assertNotNull(result);
- assertNotNull(result.getOne());
- assertNotNull(result.getNestedObject());
- assertEquals(testObjectContainer.getOne(), result.getOne());
- assertEquals(testObjectContainer.getNested().getOne(), result.getNestedObject().getOne());
- }
-
- @Test
- public void canNestedProtoFieldFromProto() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder.setOne("InnerName");
-
- ProtoTestObjectWithNestedProtoObject.Builder protoTestObjectWithNestedProtoObjectBuilder = ProtoTestObjectWithNestedProtoObject.newBuilder();
- protoTestObjectWithNestedProtoObjectBuilder.setNestedObject(simpleProtoTestObjectBuilder.build());
- protoTestObjectWithNestedProtoObjectBuilder.setOne("Name");
-
- ProtoTestObjectWithNestedProtoObject protoTestObjectWithNestedProtoObject = protoTestObjectWithNestedProtoObjectBuilder.build();
-
- TestObjectContainer result = mapper.map(protoTestObjectWithNestedProtoObject, TestObjectContainer.class);
-
- assertNotNull(result);
- assertNotNull(result.getOne());
- assertNotNull(result.getNested());
- assertNotNull(result.getNested().getOne());
- assertEquals(protoTestObjectWithNestedProtoObject.getOne(), result.getOne());
- assertEquals(protoTestObjectWithNestedProtoObject.getNestedObject().getOne(), result.getNested().getOne());
- }
-
- @Test
- public void canEnumProtoFieldToProto() {
- ObjectWithEnumField objectWithEnumField = new ObjectWithEnumField();
- objectWithEnumField.setEnumField(SimpleEnum.VALUE1);
-
- ProtoObjectWithEnumField result = mapper.map(objectWithEnumField, ProtoObjectWithEnumField.class);
-
- assertNotNull(result);
- assertNotNull(result.getEnumField());
- assertEquals(objectWithEnumField.getEnumField().name(), result.getEnumField().name());
- }
-
- @Test
- public void canEnumProtoFieldFromProto() {
- ProtoObjectWithEnumField.Builder protoObjectWithEnumFieldBuilder = ProtoObjectWithEnumField.newBuilder();
- protoObjectWithEnumFieldBuilder.setEnumField(ProtoEnum.VALUE1);
-
- ProtoObjectWithEnumField protoObjectWithEnumField = protoObjectWithEnumFieldBuilder.build();
-
- ObjectWithEnumField result = mapper.map(protoObjectWithEnumField, ObjectWithEnumField.class);
-
- assertNotNull(result);
- assertNotNull(result.getEnumField());
- assertEquals(protoObjectWithEnumField.getEnumField().name(), result.getEnumField().name());
- }
-
- @Test
- public void canRepeatedFieldToProto() {
- TestObject testObject = new TestObject();
- testObject.setOne("One");
-
- ObjectWithCollection objectWithCollection = new ObjectWithCollection();
- objectWithCollection.setObjects(Arrays.asList(testObject));
-
- ProtobufWithSimpleCollection result = mapper.map(objectWithCollection, ProtobufWithSimpleCollection.class);
-
- assertNotNull(result);
- assertNotNull(result.getObjectList());
- assertEquals(1, result.getObjectCount());
- assertNotNull(result.getObject(0));
- assertNotNull(result.getObject(0).getOne());
- assertEquals(objectWithCollection.getObjects().get(0).getOne(), result.getObject(0).getOne());
- }
-
- @Test
- public void canRepeatedFieldFromProto() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder.setOne("One");
-
- ProtobufWithSimpleCollection.Builder protobufWithSimpleCollectionBuilder = ProtobufWithSimpleCollection.newBuilder();
- protobufWithSimpleCollectionBuilder.addAllObject(Arrays.asList(simpleProtoTestObjectBuilder.build()));
-
- ProtobufWithSimpleCollection protobufWithSimpleCollection = protobufWithSimpleCollectionBuilder.build();
-
- ObjectWithCollection result = mapper.map(protobufWithSimpleCollection, ObjectWithCollection.class);
-
- assertNotNull(result);
- assertNotNull(result.getObjects());
- assertEquals(1, result.getObjects().size());
- assertNotNull(result.getObjects().get(0));
- assertNotNull(result.getObjects().get(0).getOne());
- assertEquals(protobufWithSimpleCollection.getObject(0).getOne(), result.getObjects().get(0).getOne());
- }
-
- @Test
- public void canRepeatedEnumFieldToProto() {
- ObjectWithEnumCollection objectWithEnumCollection = new ObjectWithEnumCollection();
- objectWithEnumCollection.setEnums(Arrays.asList(SimpleEnum.VALUE1));
-
- ProtobufWithEnumCollection result = mapper.map(objectWithEnumCollection, ProtobufWithEnumCollection.class);
-
- assertNotNull(result);
- assertNotNull(result.getObjectList());
- assertEquals(1, result.getObjectCount());
- assertNotNull(result.getObject(0));
- assertEquals(objectWithEnumCollection.getEnums().get(0).name(), result.getObject(0).name());
- }
-
- @Test
- public void canRepeatedEnumFieldFromProto() {
- ProtobufWithEnumCollection.Builder protobufWithEnumCollectionBuilder = ProtobufWithEnumCollection.newBuilder();
- protobufWithEnumCollectionBuilder.addAllObject(Arrays.asList(ProtoEnum.VALUE1));
-
- ProtobufWithEnumCollection protobufWithEnumCollection = protobufWithEnumCollectionBuilder.build();
-
- ObjectWithEnumCollection result = mapper.map(protobufWithEnumCollection, ObjectWithEnumCollection.class);
-
- assertNotNull(result);
- assertNotNull(result.getEnums());
- assertEquals(1, result.getEnums().size());
- assertNotNull(result.getEnums().get(0));
- assertEquals(protobufWithEnumCollection.getObject(0).name(), result.getEnums().get(0).name());
- }
-
- @Test
- public void canBadMapToProto() {
- badMapToProtoExpectedException.expect(MappingException.class);
- badMapToProtoExpectedException.expectMessage("Could not call map setter method putAllValue");
- badMapToProtoExpectedException.expectCause(IsInstanceOf.instanceOf(InvocationTargetException.class));
-
- MapExample mapExample = new MapExample();
- mapExample.put("test", null);
- mapExample.put("foo", "bar");
-
- mapper.map(mapExample, ProtobufMapExample.class);
- }
-
- @Test
- public void canMapToProto() {
- MapExample mapExample = new MapExample();
- mapExample.put("test", "value");
-
- ProtobufMapExample result = mapper.map(mapExample, ProtobufMapExample.class);
-
- assertNotNull(result);
- assertNotNull(result.getValueMap());
- assertEquals(mapExample.getValue(), result.getValueMap());
- }
-
- @Test
- public void canBadMapFromProto() {
- badMapFromProtoExpectedException.expect(NullPointerException.class);
-
- ProtobufMapExample.Builder protoMapExample = ProtobufMapExample.newBuilder();
- protoMapExample.putValue("test", null);
- }
-
- @Test
- public void canMapFromProto() {
- ProtobufMapExample.Builder protobufMapExampleBuilder = ProtobufMapExample.newBuilder();
- protobufMapExampleBuilder.putValue("test", "value");
- protobufMapExampleBuilder.putValue("foo", "bar");
-
- MapExample result = mapper.map(protobufMapExampleBuilder, MapExample.class);
-
- assertNotNull(result);
- assertNotNull(result.getValue());
- assertEquals(protobufMapExampleBuilder.getValueMap(), result.getValue());
- }
-
- @Test
- public void canSnakeCaseFieldFromProto() {
- ProtobufFieldNaming.Builder protobufFieldNamingBuilder = ProtobufFieldNaming.newBuilder();
- protobufFieldNamingBuilder.setSnakeCaseField("some value");
-
- ProtobufFieldNaming protobufFieldNaming = protobufFieldNamingBuilder.build();
-
- FieldNaming result = mapper.map(protobufFieldNaming, FieldNaming.class);
-
- assertNotNull(result);
- assertNotNull(result.getSnakeCaseField());
- assertEquals(protobufFieldNaming.getSnakeCaseField(), result.getSnakeCaseField());
- }
-
- @Test
- public void canSnakeCaseFieldToProto() {
- FieldNaming fieldNaming = new FieldNaming();
- fieldNaming.setSnakeCaseField("some value");
-
- ProtobufFieldNaming result = mapper.map(fieldNaming, ProtobufFieldNaming.class);
-
- assertNotNull(result);
- assertNotNull(result.getSnakeCaseField());
- assertEquals(fieldNaming.getSnakeCaseField(), result.getSnakeCaseField());
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/functional_tests/ProtoBeansMultipleFilesMappingTest.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/functional_tests/ProtoBeansMultipleFilesMappingTest.java
deleted file mode 100644
index 642e53b5b..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/functional_tests/ProtoBeansMultipleFilesMappingTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.functional_tests;
-
-import com.github.dozermapper.core.DozerBeanMapperBuilder;
-import com.github.dozermapper.core.Mapper;
-import com.github.dozermapper.protobuf.vo.proto.TestContainerObject;
-import com.github.dozermapper.protobuf.vo.proto.NestedObject;
-import com.github.dozermapper.protobuf.vo.proto.TestObject;
-import com.github.dozermapper.protobuf.vo.proto.TestContainerObject.TestContainedEnum;
-import com.github.dozermapper.protobuf.vo.protomultiple.ContainerObject;
-import com.github.dozermapper.protobuf.vo.protomultiple.ContainerObject.ContainedEnum;
-import com.github.dozermapper.protobuf.vo.protomultiple.SimpleProtoTestObject;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-public class ProtoBeansMultipleFilesMappingTest {
-
- private static Mapper mapper;
-
- @BeforeClass
- public static void setUp() {
- mapper = DozerBeanMapperBuilder.create()
- .withMappingFiles("mappings/protoBeansMapping.xml")
- .build();
- }
-
- @Test
- public void canSimpleToProto() {
- TestObject testObject = new TestObject();
- testObject.setOne("ABC");
-
- NestedObject nestedObject = new NestedObject();
- nestedObject.setNested(testObject);
-
- SimpleProtoTestObject result = mapper.map(nestedObject, SimpleProtoTestObject.class);
-
- assertNotNull(result);
- assertNotNull(result.getNested());
- assertNotNull(result.getNested().getOne());
- assertEquals(nestedObject.getNested().getOne(), result.getNested().getOne());
- }
-
- @Test
- public void canSimpleFromProto() {
- SimpleProtoTestObject.Builder simpleProtoTestObjectBuilder = SimpleProtoTestObject.newBuilder();
- simpleProtoTestObjectBuilder.getNestedBuilder().setOne("ABC");
-
- SimpleProtoTestObject simpleProtoTestObject = simpleProtoTestObjectBuilder.build();
-
- NestedObject result = mapper.map(simpleProtoTestObject, NestedObject.class);
-
- assertNotNull(result);
- assertNotNull(result.getNested());
- assertNotNull(result.getNested().getOne());
- assertEquals(simpleProtoTestObject.getNested().getOne(), result.getNested().getOne());
- }
-
- @Test
- public void canNestedObjectToProto() {
- TestContainerObject containerObject = new TestContainerObject();
- containerObject.setEnum1(TestContainedEnum.VALUE2);
- containerObject.setObj1(new TestContainerObject.TestContainedObject());
- containerObject.getObj1().setC1("ABC");
-
- ContainerObject result = mapper.map(containerObject, ContainerObject.class);
- assertNotNull(result);
- assertNotNull(result.getEnum1());
- assertNotNull(result.getObj1());
- assertNotNull(result.getObj1().getC1());
- assertEquals(containerObject.getObj1().getC1(), result.getObj1().getC1());
- assertEquals(containerObject.getEnum1().name(), result.getEnum1().name());
- }
-
- @Test
- public void canNestedObjectFromProto() {
- ContainerObject.Builder containerBuiler = ContainerObject.newBuilder();
- containerBuiler.setEnum1(ContainedEnum.VALUE2);
- containerBuiler.setObj1(ContainerObject.ContainedObject.newBuilder().setC1("ABC").build());
- ContainerObject container = containerBuiler.build();
- TestContainerObject result = mapper.map(container, TestContainerObject.class);
- assertNotNull(result);
- assertNotNull(result.getEnum1());
- assertNotNull(result.getObj1());
- assertNotNull(result.getObj1().getC1());
- assertEquals(container.getObj1().getC1(), result.getObj1().getC1());
- assertEquals(container.getEnum1().name(), result.getEnum1().name());
-
-
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/propertydescriptor/ProtoFieldPropertyDescriptorCreationStrategyTest.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/propertydescriptor/ProtoFieldPropertyDescriptorCreationStrategyTest.java
deleted file mode 100644
index bcd55b764..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/propertydescriptor/ProtoFieldPropertyDescriptorCreationStrategyTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.propertydescriptor;
-
-import com.github.dozermapper.core.config.BeanContainer;
-import com.github.dozermapper.core.factory.DestBeanCreator;
-import com.github.dozermapper.core.propertydescriptor.PropertyDescriptorFactory;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-public class ProtoFieldPropertyDescriptorCreationStrategyTest {
-
- private ProtoFieldPropertyDescriptorCreationStrategy strategy;
-
- @Before
- public void setUp() {
- BeanContainer beanContainer = new BeanContainer();
- DestBeanCreator destBeanCreator = new DestBeanCreator(beanContainer);
- strategy = new ProtoFieldPropertyDescriptorCreationStrategy(beanContainer, destBeanCreator, new PropertyDescriptorFactory());
- }
-
- @Test
- public void isApplicableTrueIfMessageAndDeepMapping() {
- /*any proto message class*/
- assertTrue(strategy.isApplicable(ProtoTestObjects.SimpleProtoTestObject.class,"deep.mapping"));
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/util/ProtoUtilsTest.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/util/ProtoUtilsTest.java
deleted file mode 100644
index e9081e122..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/util/ProtoUtilsTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.util;
-
-import com.github.dozermapper.core.MappingException;
-import com.github.dozermapper.core.config.BeanContainer;
-import com.github.dozermapper.protobuf.vo.proto.FakeMessage;
-import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects;
-import com.google.protobuf.Descriptors;
-import com.google.protobuf.Message;
-
-import org.hamcrest.core.IsInstanceOf;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-public class ProtoUtilsTest {
-
- @Rule
- public ExpectedException handlesIncorrectMessageExpectedException = ExpectedException.none();
-
- @Test
- public void canGetBuilder() {
- Message.Builder result = ProtoUtils.getBuilder(ProtoTestObjects.ProtobufFieldNaming.class);
-
- assertNotNull(result);
- }
-
- @Test
- public void handlesIncorrectMessage() {
- handlesIncorrectMessageExpectedException.expect(MappingException.class);
- handlesIncorrectMessageExpectedException.expectMessage("Failed to create Message.Builder for com.github.dozermapper.protobuf.vo.proto.FakeMessage");
- handlesIncorrectMessageExpectedException.expectCause(IsInstanceOf.instanceOf(NoSuchMethodException.class));
-
- ProtoUtils.getBuilder(FakeMessage.class);
- }
-
- @Test
- public void getJavaGenericClassForCollectionHandlesNonCollections() {
- Descriptors.FieldDescriptor fieldDescriptor = ProtoUtils.getFieldDescriptor(ProtoTestObjects.SimpleProtoTestObjectWithoutRequired.class, "one");
-
- assertNull(ProtoUtils.getJavaGenericClassForCollection(fieldDescriptor, new BeanContainer()));
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/FakeMessage.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/FakeMessage.java
deleted file mode 100644
index 6ab3471bc..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/FakeMessage.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-import com.google.protobuf.GeneratedMessageV3;
-import com.google.protobuf.Message;
-
-public class FakeMessage extends GeneratedMessageV3 {
-
- @Override
- protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
- return null;
- }
-
- @Override
- protected Message.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent) {
- return null;
- }
-
- @Override
- public Message.Builder newBuilderForType() {
- return null;
- }
-
- @Override
- public Message.Builder toBuilder() {
- return null;
- }
-
- @Override
- public Message getDefaultInstanceForType() {
- return null;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/FieldNaming.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/FieldNaming.java
deleted file mode 100644
index 2c3843f73..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/FieldNaming.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-public class FieldNaming {
-
- private String snakeCaseField;
-
- public String getSnakeCaseField() {
- return snakeCaseField;
- }
-
- public void setSnakeCaseField(String snakeCaseField) {
- this.snakeCaseField = snakeCaseField;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/LiteTestObject.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/LiteTestObject.java
deleted file mode 100644
index 71c987bbd..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/LiteTestObject.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-public class LiteTestObject {
-
- private String one;
-
- public LiteTestObject() {
- }
-
- public LiteTestObject(String one) {
- this.one = one;
- }
-
- public String getOne() {
- return one;
- }
-
- public void setOne(String one) {
- this.one = one;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/LiteTestObjectContainer.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/LiteTestObjectContainer.java
deleted file mode 100644
index 84b404811..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/LiteTestObjectContainer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-public class LiteTestObjectContainer {
-
- private LiteTestObject object;
-
- public LiteTestObject getObject() {
- return object;
- }
-
- public void setObject(LiteTestObject object) {
- this.object = object;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/MapExample.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/MapExample.java
deleted file mode 100644
index d2b028dd0..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/MapExample.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class MapExample {
-
- private Map value = new HashMap<>();
-
- public Map getValue() {
- return value;
- }
-
- public void setValue(Map value) {
- this.value = value;
- }
-
- public void put(String key, String value) {
- this.value.put(key, value);
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/NestedObject.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/NestedObject.java
deleted file mode 100644
index 17a764f7f..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/NestedObject.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-public class NestedObject {
- public TestObject getNested() {
- return nested;
- }
-
- public void setNested(TestObject nested) {
- this.nested = nested;
- }
-
- private TestObject nested;
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/ObjectWithCollection.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/ObjectWithCollection.java
deleted file mode 100644
index 5566ac0b6..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/ObjectWithCollection.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-import java.util.List;
-
-public class ObjectWithCollection {
-
- private List objects;
-
- public List getObjects() {
- return objects;
- }
-
- public void setObjects(List objects) {
- this.objects = objects;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/ObjectWithEnumCollection.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/ObjectWithEnumCollection.java
deleted file mode 100644
index 68f4e3af2..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/ObjectWithEnumCollection.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-import java.util.List;
-
-public class ObjectWithEnumCollection {
-
- private List enums;
-
- public ObjectWithEnumCollection() {
- }
-
- public ObjectWithEnumCollection(List enums) {
- this.enums = enums;
- }
-
- public List getEnums() {
- return enums;
- }
-
- public void setEnums(List enums) {
- this.enums = enums;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/ObjectWithEnumField.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/ObjectWithEnumField.java
deleted file mode 100644
index 6fbadff88..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/ObjectWithEnumField.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-public class ObjectWithEnumField {
-
- private SimpleEnum enumField;
-
- public ObjectWithEnumField() {
- }
-
- public ObjectWithEnumField(SimpleEnum enumField) {
- this.enumField = enumField;
- }
-
- public SimpleEnum getEnumField() {
- return enumField;
- }
-
- public void setEnumField(SimpleEnum enumField) {
- this.enumField = enumField;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/SimpleEnum.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/SimpleEnum.java
deleted file mode 100644
index 1f06ac8de..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/SimpleEnum.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-public enum SimpleEnum {
-
- VALUE1,
- VALUE2
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/TestContainerObject.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/TestContainerObject.java
deleted file mode 100644
index ad445033e..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/TestContainerObject.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-public class TestContainerObject {
- public enum TestContainedEnum {
- VALUE1, VALUE2;
- }
-
- public static class TestContainedObject{
- private String c1;
-
- public TestContainedObject() {
-
- }
-
- public String getC1() {
- return c1;
- }
-
- public void setC1(String c1) {
- this.c1 = c1;
- }
- }
-
- private TestContainedObject obj1;
- private TestContainedEnum enum1;
-
- public TestContainerObject() {
- }
-
- public TestContainedEnum getEnum1() {
- return enum1;
- }
-
- public TestContainedObject getObj1() {
- return obj1;
- }
-
- public void setEnum1(TestContainedEnum enum1) {
- this.enum1 = enum1;
- }
-
- public void setObj1(TestContainedObject obj1) {
- this.obj1 = obj1;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/TestObject.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/TestObject.java
deleted file mode 100755
index 90b2f356b..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/TestObject.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-public class TestObject {
-
- private String one;
- private Integer two;
-
- public String getOne() {
- return one;
- }
-
- public void setOne(String one) {
- this.one = one;
- }
-
- public Integer getTwo() {
- return two;
- }
-
- public void setTwo(Integer two) {
- this.two = two;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/TestObjectContainer.java b/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/TestObjectContainer.java
deleted file mode 100644
index db99dc7db..000000000
--- a/dozer-integrations/dozer-proto3/src/test/java/com/github/dozermapper/protobuf/vo/proto/TestObjectContainer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.dozermapper.protobuf.vo.proto;
-
-public class TestObjectContainer {
-
- private TestObject nested;
- private String one;
-
- public TestObjectContainer() {
- }
-
- public TestObjectContainer(TestObject nested, String one) {
- this.nested = nested;
- this.one = one;
- }
-
- public String getOne() {
- return one;
- }
-
- public void setOne(String one) {
- this.one = one;
- }
-
- public TestObject getNested() {
- return nested;
- }
-
- public void setNested(TestObject nested) {
- this.nested = nested;
- }
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/proto/ProtoTestObjects.proto b/dozer-integrations/dozer-proto3/src/test/proto/ProtoTestObjects.proto
deleted file mode 100644
index d1ea1d40a..000000000
--- a/dozer-integrations/dozer-proto3/src/test/proto/ProtoTestObjects.proto
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto3";
-option java_package = "com.github.dozermapper.protobuf.vo.proto";
-option java_outer_classname = "ProtoTestObjects";
-
-message SimpleProtoTestObject {
- string one = 1;
-}
-
-message SimpleProtoTestObjectWithoutRequired {
- string one = 1;
-}
-
-message ProtoTestObjectWithNestedProtoObject {
- string one = 1;
- SimpleProtoTestObject nestedObject = 2;
-}
-
-enum ProtoEnum {
- VALUE0 = 0;
- VALUE1 = 1;
- VALUE2 = 2;
-}
-
-message ProtoObjectWithEnumField {
- ProtoEnum enumField = 1;
-}
-
-message ProtobufWithSimpleCollection {
- repeated SimpleProtoTestObject object = 1;
-}
-
-message ProtobufWithSimpleCollectionContainer {
- ProtobufWithSimpleCollection object = 1;
-}
-
-message ProtobufWithEnumCollection {
- repeated ProtoEnum object = 1;
-}
-
-message ProtobufMapExample {
- map value = 1;
-}
-
-message ProtobufFieldNaming {
- string snake_case_field = 1;
-}
diff --git a/dozer-integrations/dozer-proto3/src/test/proto/ProtoTestObjectsMultipleFiles.proto b/dozer-integrations/dozer-proto3/src/test/proto/ProtoTestObjectsMultipleFiles.proto
deleted file mode 100644
index 39f2544ea..000000000
--- a/dozer-integrations/dozer-proto3/src/test/proto/ProtoTestObjectsMultipleFiles.proto
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2005-2019 Dozer Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto3";
-option java_package = "com.github.dozermapper.protobuf.vo.protomultiple";
-option java_multiple_files = true;
-
-message TestObject {
- string one = 1;
-}
-
-message SimpleProtoTestObject {
- TestObject nested = 1;
-}
-
-message ContainerObject {
-
- enum ContainedEnum {
- VALUE1 = 0;
- VALUE2 = 1;
- }
-
- message ContainedObject {
- string c1 = 1;
- }
-
- ContainedObject obj1 = 1;
- ContainedEnum enum1 = 2;
-}
\ No newline at end of file
diff --git a/dozer-integrations/dozer-proto3/src/test/resources/mappings/protoBeansMapping.xml b/dozer-integrations/dozer-proto3/src/test/resources/mappings/protoBeansMapping.xml
deleted file mode 100644
index c48f5890b..000000000
--- a/dozer-integrations/dozer-proto3/src/test/resources/mappings/protoBeansMapping.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
-
- true
-
-
-
- com.github.dozermapper.protobuf.vo.proto.LiteTestObject
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObject
-
-
-
- com.github.dozermapper.protobuf.vo.proto.TestObject
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObject
-
- one
- one
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.TestObject
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObjectWithoutRequired
-
- one
- one
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.TestObjectContainer
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoTestObjectWithNestedProtoObject
-
- one
- one
-
-
- nested
- nestedObject
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.ObjectWithEnumField
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoObjectWithEnumField
-
- enumField
- enumField
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.ObjectWithCollection
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollection
-
- objects
- object
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.ObjectWithEnumCollection
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithEnumCollection
-
- enums
- object
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.TestContainerObject.TestContainedObject
- com.github.dozermapper.protobuf.vo.protomultiple.ContainerObject.ContainedObject
-
- c1
- c1
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.TestContainerObject
- com.github.dozermapper.protobuf.vo.protomultiple.ContainerObject
-
- obj1
- obj1
-
-
- enum1
- enum1
-
-
-
-
diff --git a/dozer-integrations/dozer-proto3/src/test/resources/mappings/protoSrcDeepBeansMapping.xml b/dozer-integrations/dozer-proto3/src/test/resources/mappings/protoSrcDeepBeansMapping.xml
deleted file mode 100644
index 6c5fcd685..000000000
--- a/dozer-integrations/dozer-proto3/src/test/resources/mappings/protoSrcDeepBeansMapping.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
- true
-
-
-
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoTestObjectWithNestedProtoObject
- com.github.dozermapper.protobuf.vo.proto.LiteTestObject
-
- nestedObject.one
- one
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollection
- com.github.dozermapper.protobuf.vo.proto.LiteTestObject
-
- object[1].one
- one
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollectionContainer
- com.github.dozermapper.protobuf.vo.proto.ObjectWithCollection
-
- object.object
- objects
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollectionContainer
- com.github.dozermapper.protobuf.vo.proto.LiteTestObjectContainer
-
- object.object[0]
- object
-
-
-
-
- com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollection
- com.github.dozermapper.protobuf.vo.proto.LiteTestObjectContainer
-
- object[1]
- object
-
-
-
-
diff --git a/dozer-integrations/dozer-spring-support/dozer-spring-boot-autoconfigure/pom.xml b/dozer-integrations/dozer-spring-support/dozer-spring-boot-autoconfigure/pom.xml
index ff08522b5..69eaccbfb 100644
--- a/dozer-integrations/dozer-spring-support/dozer-spring-boot-autoconfigure/pom.xml
+++ b/dozer-integrations/dozer-spring-support/dozer-spring-boot-autoconfigure/pom.xml
@@ -24,7 +24,7 @@
com.github.dozermapper
dozer-spring-support
- 6.5.3-SNAPSHOT
+ 7.0.0-SNAPSHOT
dozer-spring-boot-autoconfigure
@@ -61,20 +61,4 @@