camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zregv...@apache.org
Subject [05/25] camel git commit: CAMEL-10141: make camel-salesforce-maven-plugin tests pass on Java 9
Date Fri, 05 May 2017 11:15:23 GMT
CAMEL-10141: make camel-salesforce-maven-plugin tests pass on Java 9


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b4c6c72e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b4c6c72e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b4c6c72e

Branch: refs/heads/master
Commit: b4c6c72e95b6e9c2621cffd61da8f78a697391f7
Parents: 6cf3eb2
Author: jpoth <poth.john@gmail.com>
Authored: Wed Apr 26 17:10:10 2017 +0200
Committer: Zoran Regvart <zregvart@apache.org>
Committed: Fri May 5 13:14:36 2017 +0200

----------------------------------------------------------------------
 .../camel-salesforce-maven-plugin/pom.xml       |   5 +
 .../maven/CamelSalesforceMojoOutputTest.java    |   7 +-
 .../test/resources/generated/Case.java-Java9    | 259 +++++++++++++++++++
 .../ComplexCalculatedFormula.java-Java9         | 144 +++++++++++
 .../apache/camel/test/junit4/TestSupport.java   |  16 ++
 5 files changed, 430 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b4c6c72e/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml b/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml
index d6928f0..f132319 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml
@@ -182,6 +182,11 @@
       <artifactId>commons-io</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/camel/blob/b4c6c72e/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
index a30f5de..8b7de57 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
@@ -26,6 +26,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 
 import org.apache.camel.component.salesforce.api.dto.SObjectDescription;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
+import org.apache.camel.test.junit4.TestSupport;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.junit.Assert;
@@ -84,10 +85,14 @@ public class CamelSalesforceMojoOutputTest {
         final File pkgDir = temp.newFolder();
 
         mojo.processDescription(pkgDir, description, utility, FIXED_DATE);
-
+        
         File generatedFile = new File(pkgDir, source);
         String generatedContent = FileUtils.readFileToString(generatedFile, StandardCharsets.UTF_8);
 
+        if (TestSupport.getJavaMajorVersion() >= 9 && (source.equals("Case.java")
|| source.equals("ComplexCalculatedFormula.java"))) {
+            //Content is the same, the ordering is a bit different.
+            source += "-Java9";
+        }
         String expectedContent = IOUtils
             .toString(CamelSalesforceMojoOutputTest.class.getResource("/generated/" + source),
StandardCharsets.UTF_8);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/b4c6c72e/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/resources/generated/Case.java-Java9
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/resources/generated/Case.java-Java9
b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/resources/generated/Case.java-Java9
new file mode 100644
index 0000000..24f6ca8
--- /dev/null
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/resources/generated/Case.java-Java9
@@ -0,0 +1,259 @@
+/*
+ * Salesforce DTO generated by camel-salesforce-maven-plugin
+ * Generated on: Thu Mar 09 16:15:49 ART 2017
+ */
+package $packageName;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamConverter;
+
+import org.apache.camel.component.salesforce.api.PicklistEnumConverter;
+import org.apache.camel.component.salesforce.api.dto.AbstractDescribedSObjectBase;
+import org.apache.camel.component.salesforce.api.dto.ChildRelationShip;
+import org.apache.camel.component.salesforce.api.dto.InfoUrls;
+import org.apache.camel.component.salesforce.api.dto.NamedLayoutInfo;
+import org.apache.camel.component.salesforce.api.dto.RecordTypeInfo;
+import org.apache.camel.component.salesforce.api.dto.SObjectDescription;
+import org.apache.camel.component.salesforce.api.dto.SObjectDescriptionUrls;
+import org.apache.camel.component.salesforce.api.dto.SObjectField;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Salesforce DTO for SObject Case
+ */
+@Generated("org.apache.camel.maven.CamelSalesforceMojo")
+@XStreamAlias("Case")
+public class Case extends AbstractDescribedSObjectBase {
+
+    private static final SObjectDescription DESCRIPTION = createSObjectDescription();
+
+    // PickListAccentMark
+    @XStreamConverter(PicklistEnumConverter.class)
+    private Case_PickListAccentMarkEnum PickListAccentMark;
+
+    @JsonProperty("PickListAccentMark")
+    public Case_PickListAccentMarkEnum getPickListAccentMark() {
+        return this.PickListAccentMark;
+    }
+
+    @JsonProperty("PickListAccentMark")
+    public void setPickListAccentMark(Case_PickListAccentMarkEnum PickListAccentMark) {
+        this.PickListAccentMark = PickListAccentMark;
+    }
+
+    // PickListSlash
+    @XStreamConverter(PicklistEnumConverter.class)
+    private Case_PickListSlashEnum PickListSlash;
+
+    @JsonProperty("PickListSlash")
+    public Case_PickListSlashEnum getPickListSlash() {
+        return this.PickListSlash;
+    }
+
+    @JsonProperty("PickListSlash")
+    public void setPickListSlash(Case_PickListSlashEnum PickListSlash) {
+        this.PickListSlash = PickListSlash;
+    }
+
+    // PickListQuotationMark
+    @XStreamConverter(PicklistEnumConverter.class)
+    private Case_PickListQuotationMarkEnum PickListQuotationMark;
+
+    @JsonProperty("PickListQuotationMark")
+    public Case_PickListQuotationMarkEnum getPickListQuotationMark() {
+        return this.PickListQuotationMark;
+    }
+
+    @JsonProperty("PickListQuotationMark")
+    public void setPickListQuotationMark(Case_PickListQuotationMarkEnum PickListQuotationMark)
{
+        this.PickListQuotationMark = PickListQuotationMark;
+    }
+
+
+    @Override
+    public final SObjectDescription description() {
+        return DESCRIPTION;
+    }
+
+    private static SObjectDescription createSObjectDescription() {
+        final SObjectDescription description = new SObjectDescription();
+
+
+        description.setMergeable(false);
+        description.setUndeletable(true);
+        description.setSearchLayoutable("true");
+        description.setCreateable(true);
+        description.setQueryable(true);
+        description.setLabel("Caso");
+        description.setCustom(false);
+        description.setReplicateable(true);
+        description.setTriggerable(true);
+
+        final SObjectDescriptionUrls sObjectDescriptionUrls1 = new SObjectDescriptionUrls();
+        sObjectDescriptionUrls1.setDescribe("/services/data/v34.0/sobjects/Case/describe");
+        sObjectDescriptionUrls1.setCaseArticleSuggestions("/services/data/v34.0/sobjects/Case/suggestedArticles");
+        sObjectDescriptionUrls1.setCaseRowArticleSuggestions("/services/data/v34.0/sobjects/Case/{ID}/suggestedArticles");
+        sObjectDescriptionUrls1.setRowTemplate("/services/data/v34.0/sobjects/Case/{ID}");
+        sObjectDescriptionUrls1.setListviews("/services/data/v34.0/sobjects/Case/listviews");
+        sObjectDescriptionUrls1.setUiNewRecord("https://salesforce-host/500/e");
+        sObjectDescriptionUrls1.setLayouts("/services/data/v34.0/sobjects/Case/describe/layouts");
+        sObjectDescriptionUrls1.setQuickActions("/services/data/v34.0/sobjects/Case/quickActions");
+        sObjectDescriptionUrls1.setUiEditTemplate("https://salesforce-host/{ID}/e");
+        sObjectDescriptionUrls1.setSobject("/services/data/v34.0/sobjects/Case");
+        sObjectDescriptionUrls1.setCompactLayouts("/services/data/v34.0/sobjects/Case/describe/compactLayouts");
+        sObjectDescriptionUrls1.setApprovalLayouts("/services/data/v34.0/sobjects/Case/describe/approvalLayouts");
+        sObjectDescriptionUrls1.setUiDetailTemplate("https://salesforce-host/{ID}");
+        description.setUrls(sObjectDescriptionUrls1);
+        description.setName("Case");
+        description.setLayoutable(true);
+        description.setDeprecatedAndHidden(false);
+        description.setCompactLayoutable(true);
+
+        final List<SObjectField> fields1 = new ArrayList<>();
+        description.setFields(fields1);
+
+        final SObjectField sObjectField1 = new SObjectField();
+        fields1.add(sObjectField1);
+
+        sObjectField1.setWriteRequiresMasterRead(false);
+        sObjectField1.setNillable(true);
+        sObjectField1.setCreateable(true);
+        sObjectField1.setEncrypted(false);
+        sObjectField1.setInlineHelpText("This is a picklist accent mark test \u00F3");
+        sObjectField1.setDependentPicklist(false);
+        sObjectField1.setDigits("0");
+        sObjectField1.setLabel("Accent Mark");
+        sObjectField1.setHighScaleNumber(false);
+        sObjectField1.setDisplayLocationInDecimal(false);
+        sObjectField1.setName("PickListAccentMark");
+        sObjectField1.setHtmlFormatted(false);
+        sObjectField1.setDeprecatedAndHidden(false);
+        sObjectField1.setRestrictedPicklist(false);
+        sObjectField1.setNameField(false);
+        sObjectField1.setCaseSensitive(false);
+        sObjectField1.setPermissionable(true);
+        sObjectField1.setCascadeDelete(false);
+        sObjectField1.setDefaultedOnCreate(false);
+        sObjectField1.setExternalId(false);
+        sObjectField1.setSoapType("xsd:string");
+        sObjectField1.setScale(0);
+        sObjectField1.setCustom(false);
+        sObjectField1.setGroupable(true);
+        sObjectField1.setRestrictedDelete(false);
+        sObjectField1.setCalculated(false);
+        sObjectField1.setNamePointing(false);
+        sObjectField1.setIdLookup(false);
+        sObjectField1.setType("picklist");
+        sObjectField1.setPrecision(0);
+        sObjectField1.setLength(40);
+        sObjectField1.setSortable(true);
+        sObjectField1.setByteLength(120);
+        sObjectField1.setUpdateable(true);
+        sObjectField1.setFilterable(true);
+        sObjectField1.setQueryByDistance(false);
+        sObjectField1.setUnique(false);
+        sObjectField1.setAutoNumber(false);
+
+        final SObjectField sObjectField2 = new SObjectField();
+        fields1.add(sObjectField2);
+
+        sObjectField2.setWriteRequiresMasterRead(false);
+        sObjectField2.setNillable(true);
+        sObjectField2.setCreateable(true);
+        sObjectField2.setEncrypted(false);
+        sObjectField2.setInlineHelpText("This is a picklist slash test /");
+        sObjectField2.setDependentPicklist(false);
+        sObjectField2.setDigits("0");
+        sObjectField2.setLabel("Slash");
+        sObjectField2.setHighScaleNumber(false);
+        sObjectField2.setDisplayLocationInDecimal(false);
+        sObjectField2.setName("PickListSlash");
+        sObjectField2.setHtmlFormatted(false);
+        sObjectField2.setDeprecatedAndHidden(false);
+        sObjectField2.setRestrictedPicklist(false);
+        sObjectField2.setNameField(false);
+        sObjectField2.setCaseSensitive(false);
+        sObjectField2.setPermissionable(true);
+        sObjectField2.setCascadeDelete(false);
+        sObjectField2.setDefaultedOnCreate(false);
+        sObjectField2.setExternalId(false);
+        sObjectField2.setSoapType("xsd:string");
+        sObjectField2.setScale(0);
+        sObjectField2.setCustom(true);
+        sObjectField2.setGroupable(true);
+        sObjectField2.setRestrictedDelete(false);
+        sObjectField2.setCalculated(false);
+        sObjectField2.setNamePointing(false);
+        sObjectField2.setIdLookup(false);
+        sObjectField2.setType("picklist");
+        sObjectField2.setPrecision(0);
+        sObjectField2.setLength(255);
+        sObjectField2.setSortable(true);
+        sObjectField2.setByteLength(765);
+        sObjectField2.setUpdateable(true);
+        sObjectField2.setFilterable(true);
+        sObjectField2.setQueryByDistance(false);
+        sObjectField2.setUnique(false);
+        sObjectField2.setAutoNumber(false);
+
+        final SObjectField sObjectField3 = new SObjectField();
+        fields1.add(sObjectField3);
+
+        sObjectField3.setWriteRequiresMasterRead(false);
+        sObjectField3.setNillable(true);
+        sObjectField3.setCreateable(true);
+        sObjectField3.setEncrypted(false);
+        sObjectField3.setInlineHelpText("This is a picklist quotation mark test \"");
+        sObjectField3.setDependentPicklist(false);
+        sObjectField3.setDigits("0");
+        sObjectField3.setLabel("QuotationMark");
+        sObjectField3.setHighScaleNumber(false);
+        sObjectField3.setDisplayLocationInDecimal(false);
+        sObjectField3.setName("PickListQuotationMark");
+        sObjectField3.setHtmlFormatted(false);
+        sObjectField3.setDeprecatedAndHidden(false);
+        sObjectField3.setRestrictedPicklist(false);
+        sObjectField3.setNameField(false);
+        sObjectField3.setCaseSensitive(false);
+        sObjectField3.setPermissionable(true);
+        sObjectField3.setCascadeDelete(false);
+        sObjectField3.setDefaultedOnCreate(false);
+        sObjectField3.setExternalId(false);
+        sObjectField3.setSoapType("xsd:string");
+        sObjectField3.setScale(0);
+        sObjectField3.setCustom(true);
+        sObjectField3.setGroupable(true);
+        sObjectField3.setRestrictedDelete(false);
+        sObjectField3.setCalculated(false);
+        sObjectField3.setNamePointing(false);
+        sObjectField3.setIdLookup(false);
+        sObjectField3.setType("picklist");
+        sObjectField3.setPrecision(0);
+        sObjectField3.setLength(255);
+        sObjectField3.setSortable(true);
+        sObjectField3.setByteLength(765);
+        sObjectField3.setUpdateable(true);
+        sObjectField3.setFilterable(true);
+        sObjectField3.setQueryByDistance(false);
+        sObjectField3.setUnique(false);
+        sObjectField3.setAutoNumber(false);
+
+
+        description.setActivateable(false);
+        description.setLabelPlural("Casos");
+        description.setDeletable(true);
+        description.setSearchable(true);
+        description.setFeedEnabled(true);
+        description.setRetrieveable(true);
+        description.setCustomSetting(false);
+        description.setKeyPrefix("500");
+
+        return description;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/b4c6c72e/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/resources/generated/ComplexCalculatedFormula.java-Java9
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/resources/generated/ComplexCalculatedFormula.java-Java9
b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/resources/generated/ComplexCalculatedFormula.java-Java9
new file mode 100644
index 0000000..72c3b4b
--- /dev/null
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/resources/generated/ComplexCalculatedFormula.java-Java9
@@ -0,0 +1,144 @@
+/*
+ * Salesforce DTO generated by camel-salesforce-maven-plugin
+ * Generated on: Thu Mar 09 16:15:49 ART 2017
+ */
+package $packageName;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+
+import org.apache.camel.component.salesforce.api.dto.AbstractDescribedSObjectBase;
+import org.apache.camel.component.salesforce.api.dto.ChildRelationShip;
+import org.apache.camel.component.salesforce.api.dto.InfoUrls;
+import org.apache.camel.component.salesforce.api.dto.NamedLayoutInfo;
+import org.apache.camel.component.salesforce.api.dto.RecordTypeInfo;
+import org.apache.camel.component.salesforce.api.dto.SObjectDescription;
+import org.apache.camel.component.salesforce.api.dto.SObjectDescriptionUrls;
+import org.apache.camel.component.salesforce.api.dto.SObjectField;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Salesforce DTO for SObject ComplexCalculatedFormula
+ */
+@Generated("org.apache.camel.maven.CamelSalesforceMojo")
+@XStreamAlias("ComplexCalculatedFormula")
+public class ComplexCalculatedFormula extends AbstractDescribedSObjectBase {
+
+    private static final SObjectDescription DESCRIPTION = createSObjectDescription();
+
+    // ComplexCalculatedFormula
+    private String ComplexCalculatedFormula;
+
+    @JsonProperty("ComplexCalculatedFormula")
+    public String getComplexCalculatedFormula() {
+        return this.ComplexCalculatedFormula;
+    }
+
+    @JsonProperty("ComplexCalculatedFormula")
+    public void setComplexCalculatedFormula(String ComplexCalculatedFormula) {
+        this.ComplexCalculatedFormula = ComplexCalculatedFormula;
+    }
+
+
+    @Override
+    public final SObjectDescription description() {
+        return DESCRIPTION;
+    }
+
+    private static SObjectDescription createSObjectDescription() {
+        final SObjectDescription description = new SObjectDescription();
+
+
+        description.setMergeable(false);
+        description.setUndeletable(true);
+        description.setSearchLayoutable("true");
+        description.setCreateable(true);
+        description.setQueryable(true);
+        description.setLabel("Complex Calculated Formula");
+        description.setCustom(false);
+        description.setReplicateable(true);
+        description.setTriggerable(true);
+
+        final SObjectDescriptionUrls sObjectDescriptionUrls1 = new SObjectDescriptionUrls();
+        sObjectDescriptionUrls1.setDescribe("/services/data/v34.0/sobjects/Case/describe");
+        sObjectDescriptionUrls1.setCaseArticleSuggestions("/services/data/v34.0/sobjects/Case/suggestedArticles");
+        sObjectDescriptionUrls1.setCaseRowArticleSuggestions("/services/data/v34.0/sobjects/Case/{ID}/suggestedArticles");
+        sObjectDescriptionUrls1.setRowTemplate("/services/data/v34.0/sobjects/Case/{ID}");
+        sObjectDescriptionUrls1.setListviews("/services/data/v34.0/sobjects/Case/listviews");
+        sObjectDescriptionUrls1.setUiNewRecord("https://salesforce-host/500/e");
+        sObjectDescriptionUrls1.setLayouts("/services/data/v34.0/sobjects/Case/describe/layouts");
+        sObjectDescriptionUrls1.setQuickActions("/services/data/v34.0/sobjects/Case/quickActions");
+        sObjectDescriptionUrls1.setUiEditTemplate("https://salesforce-host/{ID}/e");
+        sObjectDescriptionUrls1.setSobject("/services/data/v34.0/sobjects/Case");
+        sObjectDescriptionUrls1.setCompactLayouts("/services/data/v34.0/sobjects/Case/describe/compactLayouts");
+        sObjectDescriptionUrls1.setApprovalLayouts("/services/data/v34.0/sobjects/Case/describe/approvalLayouts");
+        sObjectDescriptionUrls1.setUiDetailTemplate("https://salesforce-host/{ID}");
+        description.setUrls(sObjectDescriptionUrls1);
+        description.setName("ComplexCalculatedFormula");
+        description.setLayoutable(true);
+        description.setDeprecatedAndHidden(false);
+        description.setCompactLayoutable(true);
+
+        final List<SObjectField> fields1 = new ArrayList<>();
+        description.setFields(fields1);
+
+        final SObjectField sObjectField1 = new SObjectField();
+        fields1.add(sObjectField1);
+
+        sObjectField1.setWriteRequiresMasterRead(false);
+        sObjectField1.setNillable(true);
+        sObjectField1.setCreateable(false);
+        sObjectField1.setEncrypted(false);
+        sObjectField1.setDependentPicklist(false);
+        sObjectField1.setDigits("0");
+        sObjectField1.setLabel("A complex calculated formula");
+        sObjectField1.setHighScaleNumber(false);
+        sObjectField1.setDisplayLocationInDecimal(false);
+        sObjectField1.setName("ComplexCalculatedFormula");
+        sObjectField1.setHtmlFormatted(true);
+        sObjectField1.setDeprecatedAndHidden(false);
+        sObjectField1.setRestrictedPicklist(false);
+        sObjectField1.setNameField(false);
+        sObjectField1.setCaseSensitive(false);
+        sObjectField1.setPermissionable(true);
+        sObjectField1.setCascadeDelete(false);
+        sObjectField1.setDefaultedOnCreate(false);
+        sObjectField1.setExternalId(false);
+        sObjectField1.setSoapType("xsd:string");
+        sObjectField1.setScale(0);
+        sObjectField1.setCustom(true);
+        sObjectField1.setGroupable(false);
+        sObjectField1.setRestrictedDelete(false);
+        sObjectField1.setCalculated(true);
+        sObjectField1.setNamePointing(false);
+        sObjectField1.setIdLookup(false);
+        sObjectField1.setType("string");
+        sObjectField1.setPrecision(0);
+        sObjectField1.setLength(1300);
+        sObjectField1.setSortable(true);
+        sObjectField1.setByteLength(3900);
+        sObjectField1.setUpdateable(false);
+        sObjectField1.setCalculatedFormula("IF( RecordType.Id  = \"012F0000000rmbC\", \r\n\r\nIF(Case_Age__c
> 30, \r\nIMAGE(\"/img/samples/color_red.gif\", \"red\", 30, 30),\r\nIF( Case_Age__c >
15,\r\nIMAGE(\"/img/samples/color_yellow.gif\", \"yellow\", 30, 30),\r\nIMAGE(\"/img/samples/color_green.gif\",
\"green\", 30, 30)\r\n)),\r\n\r\n\r\nIF(Case_Age__c > 10, \r\nIMAGE(\"/img/samples/color_red.gif\",
\"red\", 30, 30),\r\nIF( Case_Age__c > 5,\r\nIMAGE(\"/img/samples/color_yellow.gif\", \"yellow\",
30, 30),\r\nIMAGE(\"/img/samples/color_green.gif\", \"green\", 30, 30)\r\n))\r\n)");
+        sObjectField1.setFilterable(true);
+        sObjectField1.setQueryByDistance(false);
+        sObjectField1.setUnique(false);
+        sObjectField1.setAutoNumber(false);
+
+
+        description.setActivateable(false);
+        description.setLabelPlural("ComplexCalculatedFormulas");
+        description.setDeletable(true);
+        description.setSearchable(true);
+        description.setFeedEnabled(true);
+        description.setRetrieveable(true);
+        description.setCustomSetting(false);
+        description.setKeyPrefix("500");
+
+        return description;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/b4c6c72e/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
b/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
index 52eb1f7..74f50d4 100644
--- a/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
+++ b/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
@@ -583,6 +583,22 @@ public abstract class TestSupport extends Assert {
     }
 
     /**
+     * Returns the current major Java version e.g 8.
+     * <p/>
+     * Uses <tt>java.specification.version</tt> from the system properties to
determine the major version.
+
+     * @return the current major Java version.
+     */
+    public static int getJavaMajorVersion() {
+        String javaSpecVersion = System.getProperty("java.specification.version");
+        if (javaSpecVersion.contains(".")) { //before jdk 9
+            return Integer.parseInt(javaSpecVersion.split("\\.")[1]);
+        } else {
+            return Integer.parseInt(javaSpecVersion);
+        }
+    }
+
+    /**
      * Gets the current test name
      *
      * @return the test name


Mime
View raw message