Commit Graph

823 Commits

Author SHA1 Message Date
Marcin Grzejszczak
de62368f8f Merge branch 'master' into 2.0.x 2017-08-30 13:40:20 +02:00
Marcin Grzejszczak
cd4555d4af Merge branch '1.1.x' 2017-08-30 13:40:08 +02:00
Marcin Grzejszczak
15021d3bd1 Added the missing .timeout(...) method in the generated RestAssured tests
without this change the `fixedDelayMilliseconds` only works for the stub but doesn't do anything in the generated test
with this change we're adding this functionality for MockMvc based tests

fixes #402
2017-08-30 13:02:21 +02:00
Dave Syer
258d624975 Merge branch 'master' into 2.0.x 2017-08-30 09:31:49 +01:00
Dave Syer
51a35ce6b7 Use wiremock-standalone instead of the ambient server
The standalone jar is in much better shape now, and relocates all the
dependencies, like guava and jetty, so it's safe to use in a Spring
Boot project with Tomcat or a different version of jetty.

Fixes gh-397
2017-08-30 08:29:29 +01:00
Marcin Grzejszczak
7573aa2697 Merge branch 'master' into 2.0.x 2017-08-28 17:31:20 +02:00
Marcin Grzejszczak
e48a29297a Merge branch '1.1.x' 2017-08-28 17:31:09 +02:00
Marcin Grzejszczak
8975aee9a8 Using testMatchers in DSL other than byRegex adds unsolicited isEmpty check for an array
The converted body looks different when done via the String notation than it does when done via a map notation. When working with String body and when matchers are provided, even when all entries of a map / list got removed, the map / list itself remains. That leads to unnecessary creation of checks for empty collection. With this method we're checking if the JSON path matcher is related to array checking and we're trying to remove that trailing collection. All in all it's better to use the Groovy based notation for defining body...

fixes #391
2017-08-28 17:31:05 +02:00
Marcin Grzejszczak
d9eac4bf31 Merge branch 'master' into 2.0.x 2017-08-28 16:10:11 +02:00
Marcin Grzejszczak
4e122278a6 Merge branch '1.1.x' 2017-08-28 16:09:59 +02:00
Marcin Grzejszczak
49df7bf472 Wrong assertion type is picked for Iterables
without this change in the generated test when SpringCloudContractAssertions are used the compiler is picking an invalid type of Assertj Assertions.
with this change we're explicitly casting to the appropriate interface so that the SpringCloudContractAssertions methods are picked

fixes #381
2017-08-28 16:09:51 +02:00
Marcin Grzejszczak
4c82cf1b58 Revert "Wrong assertion type is picked for Iterables"
This reverts commit 8d2549fecf.
2017-08-28 16:04:13 +02:00
Marcin Grzejszczak
39201f11bb Merge branch 'master' into 2.0.x 2017-08-28 16:01:02 +02:00
Marcin Grzejszczak
50c5a416bb Merge branch '1.1.x' 2017-08-28 15:52:24 +02:00
Marcin Grzejszczak
8d2549fecf Wrong assertion type is picked for Iterables
without this change in the generated test when SpringCloudContractAssertions are used, we're casting the read element of the JSON to a Collection class whereas we should be casting to an Iterable.

fixes #381
2017-08-28 15:39:34 +02:00
Marcin Grzejszczak
1bdbd046ad Going back to snapshots 2017-08-25 15:12:32 +02:00
Marcin Grzejszczak
1550f9fe0f Update SNAPSHOT to 2.0.0.M2 2017-08-25 15:10:01 +02:00
Marcin Grzejszczak
ccdeda1fe1 Going back to snapshots 2017-08-25 14:58:18 +02:00
Marcin Grzejszczak
9782ec10ea Update SNAPSHOT to 1.2.0.M1 2017-08-25 14:55:31 +02:00
Marcin Grzejszczak
011f4b3e31 Merge branch 'master' into 2.0.x 2017-08-24 12:08:12 +02:00
Marcin Grzejszczak
3b88fea8bd basePackageForTests can be configured automatically
without this change we always set the default value of the package with generated tests, unless a value overrides it.
with this change the flow for setting the generated tests package name will look like this:

- pick basePackageForTests
- if basePackageForTests wasn't set pick the package from baseClassForTests
- if baseClassForTests wasn't set pick packageWithBaseClasses
- if nothing got set pick the default org.springframework.cloud.contract.verifier.tests

The rationale behind this change is such that often in the base class you would like to have package scoped methods and the fact that the tests are always generated in the default location requires to make these methods public or always override this property.

fixes #260
2017-08-24 12:08:02 +02:00
Marcin Grzejszczak
040f6b5105 Merge branch 'master' into 2.0.x 2017-08-22 16:47:19 +02:00
Marcin Grzejszczak
5b4c677fad Merge branch '1.1.x' 2017-08-22 16:47:11 +02:00
Marcin Grzejszczak
8ba58d3ab8 Ensure that /tmp files get removed upon process termination
fixes #359
2017-08-22 16:16:25 +02:00
Marcin Grzejszczak
b99bf95ff9 Bumping versions to 1.1.4.BUILD-SNAPSHOT after release 2017-08-21 12:33:24 +02:00
Marcin Grzejszczak
237ee85dc3 Going back to snapshots 2017-08-21 12:33:24 +02:00
Marcin Grzejszczak
b81bb2a489 Update SNAPSHOT to 1.1.3.RELEASE 2017-08-21 12:28:10 +02:00
Marcin Grzejszczak
1b00129a25 Merge branch 'master' into 2.0.x 2017-08-18 18:15:50 +02:00
Marcin Grzejszczak
b49d5724d3 Merge branch '1.1.x' 2017-08-18 18:15:41 +02:00
Marcin Grzejszczak
32cc52a4c2 Spock tests don't have the proper static import
without this change the `org.springframework.cloud.contract.verifier.assertion.SpringCloudContractAssertions.assertThat` was missing in Spock tests
with this change it is added and matchers work fine again

fixes #382
2017-08-18 18:02:29 +02:00
Marcin Grzejszczak
c50eef3082 Merge branch 'master' into 2.0.x 2017-08-18 14:58:18 +02:00
Marcin Grzejszczak
a223ee39b1 Spring Integration Stub Messages shouldn't be @Component annotated 2017-08-18 14:58:08 +02:00
Marcin Grzejszczak
f37869e348 Spring Integration Stub Messages shouldn't be @Component annotated 2017-08-18 14:57:48 +02:00
Marcin Grzejszczak
53a5fe7076 Merge branch 'master' into 2.0.x 2017-07-31 16:11:18 +02:00
Marcin Grzejszczak
b431f1b788 Bumped WireMock to 2.7.1 and added debug option for WireMock
fixes #374 #369
2017-07-31 16:09:35 +02:00
Marcin Grzejszczak
b9921f942f Merge branch 'master' into 2.0.x 2017-07-31 11:57:57 +02:00
Marcin Grzejszczak
5a37733878 Merge branch '1.1.x' 2017-07-31 11:57:48 +02:00
Cástor Rodríguez
3b44533905 Test generation to place queryParameters before async on RestAssured when chain (#373)
fixes #372
2017-07-31 11:57:06 +02:00
Marcin Grzejszczak
735797cc39 Merge branch 'master' into 2.0.x 2017-07-31 10:09:42 +02:00
Marcin Grzejszczak
7e97c8a690 Merge branch '1.1.x' 2017-07-31 10:09:13 +02:00
Rocks360
1727041400 Support for generic top level domain .online in the email regular expression (#371)
* Refactor email regular expression to support email addresses ending with .online

fixes #367
2017-07-31 10:03:49 +02:00
Marcin Grzejszczak
e4af835b8e Going back to snapshots 2017-07-21 14:30:45 +02:00
Marcin Grzejszczak
85f458e34c Update SNAPSHOT to 1.1.2.RELEASE 2017-07-21 14:06:43 +02:00
Marcin Grzejszczak
473a2b9197 Merge branch 'master' into 2.0.x 2017-07-18 17:30:48 +02:00
Marcin Grzejszczak
4de7d38a51 Added support for referencing file contents in the contract (#360)
without this change, large bodies can't be parsed by the compiler
with this change we allow those bodies to be read from files

fixes #357
2017-07-18 16:26:44 +02:00
Marcin Grzejszczak
f11d5a1153 Merge branch 'master' into 2.0.x 2017-07-17 23:11:10 +02:00
Marcin Grzejszczak
395107b3e8 Merge branch '1.1.x' 2017-07-17 23:10:54 +02:00
Felipe Adorno
421b669361 Tests fail to compile when the contract contains a long value (#358)
without this change when a contract contains a long value inside the body, then the code fails to compile since the provided number is assumed to be an integer.
with this change we're appending an L literal to that value for the compiler to assume that it's a long value.
2017-07-17 22:35:37 +02:00
Marcin Grzejszczak
e28e346f77 Merge branch 'master' into 2.0.x 2017-07-13 12:22:21 +02:00
Marcin Grzejszczak
654127302e Merge branch '1.1.x' 2017-07-13 12:10:32 +02:00