Commit Graph

256 Commits

Author SHA1 Message Date
Marcin Grzejszczak
2eef44b04a Merge branch 'master' into 2.0.x 2017-06-23 14:36:50 +02:00
Marcin Grzejszczak
22e2284256 Removed deprecations 2017-06-23 14:36:43 +02:00
Marcin Grzejszczak
bd9338e494 Fixed groovy code 2017-06-22 10:07:12 +02:00
Marcin Grzejszczak
d3a67c7470 Merge branch 'master' into 2.0.x 2017-06-20 23:38:34 +02:00
Marcin Grzejszczak
3e5de6d209 Merge branch '1.1.x' 2017-06-20 21:52:03 +02:00
Marcin Grzejszczak
97380129a4 Fixed wrong contract pattern scanning
e.g. this worked

com/example/foo/...

this didn't

/contract/com/example/foo/...

fixes #335
2017-06-20 21:46:22 +02:00
Marcin Grzejszczak
82fda14b61 Bumped versions 2017-06-20 15:10:16 +02:00
Marcin Grzejszczak
dde0360f6c Merge branch 'master' into 2.0.x 2017-06-19 18:56:59 +02:00
Marcin Grzejszczak
12ce468b6d Removing deprecations 2017-06-19 18:46:02 +02:00
Marcin Grzejszczak
c1fca13f12 Initial commit 2017-06-15 14:56:18 +02:00
Marcin Grzejszczak
1a462893e2 Fixed missing header setting and messaging test indentation
fixes #323
2017-06-09 13:05:42 +02:00
Marcin Grzejszczak
2b527b5579 Added a null check if someone passes null as headers for amqp 2017-06-09 12:15:43 +02:00
Marcin Grzejszczak
b158ed4919 Fixed broken response headers assertions
fixes #318
2017-06-05 11:29:43 +02:00
Marcin Grzejszczak
4631ab6ea8 Adds support for execute in request body
fixes #313
2017-06-01 17:50:10 +02:00
Marcin Grzejszczak
baf294dbbf Updated the contracts 2017-05-31 16:14:06 +02:00
Marcin Grzejszczak
8979b79c56 Added examples of multipart support
fixes #304
2017-05-31 15:40:35 +02:00
Marcin Grzejszczak
9fd4a21c43 Added backward compatibility with previous versions in terms of rabbitmq connection factory mocking
without this change we're not mocking all necessary methods in connection factory. When someone used the rabbittemplate, accidentaly we mocked the proper method to return a mocked connection factory. When rabbitmq started using different version of the `newConnection` in all places where rabbittemplate was used the real connection factory was created.
with this change we're mocking all `newConnection` methods to return a mocked connection

fixes #303
2017-05-31 14:28:49 +02:00
Marcin Grzejszczak
d5e933f169 Fixed tests 2017-05-26 22:27:46 +02:00
Marcin Grzejszczak
05ca8f909b Added messagingContentType
without this change you can by mistake use the http headers in a messaging headers which will fail to work
with this change we're adding the messagingContentType() method that allows to properly set the content type

fixes #296
2017-05-26 20:43:44 +02:00
Marcin Grzejszczak
459448cb27 Asserting on the payload before converting it
without this change an NPE is thrown instead of a meaningful message

fixes #307
2017-05-26 18:45:53 +02:00
Marcin Grzejszczak
e0ea1b27f0 Bumping versions to 1.1.2.BUILD-SNAPSHOT after release 2017-05-22 23:57:24 +02:00
Marcin Grzejszczak
82f68347fa Going back to snapshots 2017-05-22 23:57:23 +02:00
Marcin Grzejszczak
7a10b3bf34 Update SNAPSHOT to 1.1.1.RELEASE 2017-05-22 23:51:18 +02:00
Marcin Grzejszczak
c7f5accae4 Merge branch '1.0.x' 2017-05-11 11:38:06 +02:00
Marcin Grzejszczak
4ddae01bf9 Calling toString on getting messaging headers
With contract like this

```
	// output message of the contract
	outputMessage {
		// destination to which the output message will be sent
		sentTo 'verifications'
		// the body of the output message
		body(
			eligible: true
		)
		headers {
			header("contentType", applicationJsonUtf8())
		}
	}
```

the generated test produces

```
ContractVerifierMessage response = contractVerifierMessaging.receive("verifications");
assertThat(response.getHeader("contentType")).isEqualTo("application/json;charset=UTF-8");
```

The headers in the response is a MimeType not a String so the equality check fails.

fixes #297
2017-05-11 11:37:50 +02:00
Marcin Grzejszczak
4c4a18ed22 Bumped versions after release 2017-05-05 12:31:03 +02:00
Marcin Grzejszczak
e9306448f9 Going back to snapshots 2017-05-05 12:23:41 +02:00
Marcin Grzejszczak
bd67bb2f26 Update SNAPSHOT to 1.0.5.RELEASE 2017-05-05 12:12:38 +02:00
Marcin Grzejszczak
15ef2cab35 Merge branch '1.0.x' 2017-05-05 11:41:39 +02:00
Marcin Grzejszczak
1e16934fce Bumped jsonassert to 0.4.9
without this change we analyze empty sets of jsonpath results improperly

fixes #289
2017-05-05 11:25:19 +02:00
Marcin Grzejszczak
97a4d6c101 Merge branch '1.0.x' 2017-04-28 13:15:56 +02:00
Marcin Grzejszczak
8ca2ed6b22 Fixed the way package and class names are generated
with the new layout of contracts and stubs the package name was improperly generated (for chars like +, or digits)
with this change we're converting those chars to _

fixes #276
2017-04-28 12:46:45 +02:00
Marcin Grzejszczak
c9538548fd Adds an option to use StubRunner from classpath (#284)
without this change there's no option to use Stub Runner to pick stubs from classpath
with this change we're adding that option. It's enough for the user not to provide neither the `repositoryRoot` nor `workOffline`. If that's the case then Classpath scanning will take place.

fixes #282
2017-04-27 17:13:15 +02:00
Marcin Grzejszczak
a804894c9a Updated code and docs 2017-04-26 12:42:33 +02:00
Marcin Grzejszczak
cf52e6baa6 Added support fot dots in keys
without this change it's impossible to work with jsons that have dots in keys
    with this change that's possible again

    fixes #269
2017-04-26 12:12:17 +02:00
Marcin Grzejszczak
cf2e7e0feb Generate code that respects dots in keys
without this change if the user has jsons that contain `.` in a key (e.g. `foo.bar.baz`) then the produced json path is wrong
with this change we're wrapping all keys in `[' ']` format (e.g. `['foo.bar.baz']`) so that the json path gets properly translated

fixes #269
2017-04-25 14:57:07 +02:00
Marcin Grzejszczak
a994f7c17b Merge branch '1.0.x' 2017-04-25 13:15:56 +02:00
Marcin Grzejszczak
0d1b76c471 Fixed wrong test name 2017-04-25 13:15:04 +02:00
Marcin Grzejszczak
2942882775 :Merge branch '1.0.x' 2017-04-25 13:11:32 +02:00
Marcin Grzejszczak
0a09695b5c Fixed missing escaping of . in folder name
fixes #276
2017-04-25 13:07:10 +02:00
Marcin Grzejszczak
3c8b712aa2 Made BlockBuilder public
it's a useful class that can be used by different test generators

fixes #254
2017-04-18 12:06:09 +02:00
Marcin Grzejszczak
bfc0d87053 Merge branch '1.0.x' 2017-04-18 09:53:32 +02:00
Marcin Grzejszczak
4414ffb333 Added one more test 2017-04-18 09:53:08 +02:00
Marcin Grzejszczak
3ace049241 Fixed the quotes in JaxRs entities
without this change we're adding an unnecessary quote around a JaxRs entity
with this change we're ensuring that the quote is not there

fixes #261
2017-04-18 09:49:52 +02:00
Marcin Grzejszczak
1a22c00359 Merge branch '1.0.x' 2017-04-14 17:10:17 +02:00
Marcin Grzejszczak
2ce4b2e67c Added an option to use Rest Assured version 3.0
without this change it's impossible to use Rest Assured 3.0 with Spring Cloud Contract. That's because we are adding Rest Assured 2.0 imports.
with this change we detect Rest Assured version. If 3.0 is available on the classpath we change the imports

fixes #266
2017-04-14 15:31:22 +02:00
Marcin Grzejszczak
0f870e7bab Merge branch '1.0.x' 2017-04-14 12:34:43 +02:00
Marcin Grzejszczak
28885c1459 JSONPath compilation fails when there is an array, attribute that is an array and then attribute on an execute()
without this change we're not referrencing arrays properly in json path. For some reason (that I don't remember) we had a deferrencing via 'get' in the code. 'get' is not present in JSON Path. That's why it was failing
with this change we're deferrencing arrays via `.` or index

fixes #251
2017-04-14 12:30:57 +02:00
Marcin Grzejszczak
b142195d09 Merge branch '1.0.x' 2017-04-14 09:59:31 +02:00
Marcin Grzejszczak
5843234fa1 Fixed invalid escaping of characters for regex
without this change some regex contained invalid characters. Even though the code compiles the regular expressions passed to json assert are invalid.
with this change that gets fixed and tests are added. We're now checking if the code can be executed and not only compiled. We also check if WireMock fed with the stubs generated from these cases works fine and not only do we check if stub mappings are properly generated.

fixes #250
2017-04-14 09:40:15 +02:00