You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by an...@apache.org on 2016/08/13 18:57:26 UTC
camel git commit: CAMEL-10090: execute spock test from maven
Repository: camel
Updated Branches:
refs/heads/master db1f8eae1 -> a9d34dc87
CAMEL-10090: execute spock test from maven
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a9d34dc8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a9d34dc8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a9d34dc8
Branch: refs/heads/master
Commit: a9d34dc87003acc05f07c7dc51c8760f07f45de1
Parents: db1f8ea
Author: Arno Noordover <an...@users.noreply.github.com>
Authored: Sat Aug 13 20:57:09 2016 +0200
Committer: Arno Noordover <an...@users.noreply.github.com>
Committed: Sat Aug 13 20:57:09 2016 +0200
----------------------------------------------------------------------
.../camel-salesforce-component/pom.xml | 4 +-
.../api/utils/DateTimeUtilsTest.groovy | 56 ++++++++++++++++++++
.../api/utils/DateTimeUtilsTest.groovy | 56 --------------------
3 files changed, 58 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/a9d34dc8/components/camel-salesforce/camel-salesforce-component/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/pom.xml b/components/camel-salesforce/camel-salesforce-component/pom.xml
index 7ce2548..4f14987 100644
--- a/components/camel-salesforce/camel-salesforce-component/pom.xml
+++ b/components/camel-salesforce/camel-salesforce-component/pom.xml
@@ -170,11 +170,11 @@
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
- <version>1.4</version>
+ <version>1.5</version>
<executions>
<execution>
<goals>
- <goal>compile</goal>
+ <goal>addTestSources</goal>
<goal>testCompile</goal>
</goals>
</execution>
http://git-wip-us.apache.org/repos/asf/camel/blob/a9d34dc8/components/camel-salesforce/camel-salesforce-component/src/test/groovy/org/apache/camel/component/salesforce/api/utils/DateTimeUtilsTest.groovy
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/groovy/org/apache/camel/component/salesforce/api/utils/DateTimeUtilsTest.groovy b/components/camel-salesforce/camel-salesforce-component/src/test/groovy/org/apache/camel/component/salesforce/api/utils/DateTimeUtilsTest.groovy
new file mode 100644
index 0000000..8452fe0
--- /dev/null
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/groovy/org/apache/camel/component/salesforce/api/utils/DateTimeUtilsTest.groovy
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.camel.component.salesforce.api.utils
+
+import spock.lang.Ignore
+import spock.lang.Specification
+import spock.lang.Unroll
+
+import java.time.ZoneId
+import java.time.ZonedDateTime
+
+class DateTimeUtilsTest extends Specification {
+ @Unroll
+ def "Date #zonedDateTime should render as #result"() {
+ expect:
+ DateTimeUtils.formatDateTime(zonedDateTime) == result
+
+ where:
+ zonedDateTime || result
+ ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 7000000, ZoneId.of("UTC+01:00:21")) || "1991-12-10T12:13:14.007+01:00"
+ ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 7000000, ZoneId.of("UTC")) || "1991-12-10T12:13:14.007Z"
+ ZonedDateTime.of(1700, 1, 1, 1, 13, 14, 7000000, ZoneId.of("UTC+00:19:21")) || "1700-01-01T01:13:14.007+00:19"
+ ZonedDateTime.of(1700, 2, 3, 2, 13, 14, 7000000, ZoneId.of("UTC")) || "1700-02-03T02:13:14.007Z"
+ }
+
+ @Unroll
+ def "Date #dateAsString should parse to #result"() {
+ expect:
+ DateTimeUtils.parseDateTime(dateAsString) == result
+
+ where:
+ dateAsString || result
+ "1991-12-10T12:13:14.007+01:00" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 7000000, ZoneId.of("+01:00"))
+ "1991-12-10T12:13:14+00:00" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 0, ZoneId.of("Z"))
+ "1991-12-10T12:13:14.000+00:00" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 0, ZoneId.of("Z"))
+ "1991-12-10T12:13:14+0000" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 0, ZoneId.of("Z"))
+ "1991-12-10T12:13:14.000+0000" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 0, ZoneId.of("Z"))
+ "1991-12-10T12:13:14.007Z" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 7000000, ZoneId.of("Z"))
+ "1700-01-01T01:13:14.007+00:19" || ZonedDateTime.of(1700, 1, 1, 1, 13, 14, 7000000, ZoneId.of("+00:19"))
+ "1700-02-03T02:13:14.007Z" || ZonedDateTime.of(1700, 2, 3, 2, 13, 14, 7000000, ZoneId.of("Z"))
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/a9d34dc8/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/DateTimeUtilsTest.groovy
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/DateTimeUtilsTest.groovy b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/DateTimeUtilsTest.groovy
deleted file mode 100644
index 8452fe0..0000000
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/DateTimeUtilsTest.groovy
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.component.salesforce.api.utils
-
-import spock.lang.Ignore
-import spock.lang.Specification
-import spock.lang.Unroll
-
-import java.time.ZoneId
-import java.time.ZonedDateTime
-
-class DateTimeUtilsTest extends Specification {
- @Unroll
- def "Date #zonedDateTime should render as #result"() {
- expect:
- DateTimeUtils.formatDateTime(zonedDateTime) == result
-
- where:
- zonedDateTime || result
- ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 7000000, ZoneId.of("UTC+01:00:21")) || "1991-12-10T12:13:14.007+01:00"
- ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 7000000, ZoneId.of("UTC")) || "1991-12-10T12:13:14.007Z"
- ZonedDateTime.of(1700, 1, 1, 1, 13, 14, 7000000, ZoneId.of("UTC+00:19:21")) || "1700-01-01T01:13:14.007+00:19"
- ZonedDateTime.of(1700, 2, 3, 2, 13, 14, 7000000, ZoneId.of("UTC")) || "1700-02-03T02:13:14.007Z"
- }
-
- @Unroll
- def "Date #dateAsString should parse to #result"() {
- expect:
- DateTimeUtils.parseDateTime(dateAsString) == result
-
- where:
- dateAsString || result
- "1991-12-10T12:13:14.007+01:00" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 7000000, ZoneId.of("+01:00"))
- "1991-12-10T12:13:14+00:00" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 0, ZoneId.of("Z"))
- "1991-12-10T12:13:14.000+00:00" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 0, ZoneId.of("Z"))
- "1991-12-10T12:13:14+0000" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 0, ZoneId.of("Z"))
- "1991-12-10T12:13:14.000+0000" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 0, ZoneId.of("Z"))
- "1991-12-10T12:13:14.007Z" || ZonedDateTime.of(1991, 12, 10, 12, 13, 14, 7000000, ZoneId.of("Z"))
- "1700-01-01T01:13:14.007+00:19" || ZonedDateTime.of(1700, 1, 1, 1, 13, 14, 7000000, ZoneId.of("+00:19"))
- "1700-02-03T02:13:14.007Z" || ZonedDateTime.of(1700, 2, 3, 2, 13, 14, 7000000, ZoneId.of("Z"))
- }
-}