Commit Graph

1172 Commits

Author SHA1 Message Date
Dave Syer
67e75fd2c6 Add header matchers for mock http server
Wrapping the WireMock matcher in a Hamcrest matcher, and also
using WireMock's native support for sorting mappings, so the
most specific match comes first.
2016-10-11 14:58:14 +02:00
Dave Syer
103668c669 Add all headers if they are matched with "equalTo"
Still TODO: other matcher types (regex etc.)

See gh-105
2016-10-11 14:31:40 +02:00
Dave Syer
870e42f565 Fix mock server when path is empty
When the path is empty "/" is a better default than "null".
2016-10-11 13:57:36 +02:00
Marcin Grzejszczak
b17238ff4e Fixing missing context-path usage
without this change when the user adds context-path it gets ignored and WireMock fails to register stubs
with this change we update the WireMock instance to include the context path

fixes #99
2016-10-11 11:27:24 +02:00
Dave Syer
4313717e01 Check that header exists explicitly while loading stubs
Fixes gh-103
2016-10-11 09:49:30 +01:00
Dave Syer
1d32db483b Add test and correct double "/" in fail path
A double "/" wrks with the file system but not in a jar file
apparently, so the test isn't perfect yet. Also improves
javadocs for stubs().
2016-10-11 09:38:37 +01:00
Marcin Grzejszczak
6f116a0b6a Fixing the conditional on class
without this change if one doesn't have spring integration java dsl on classpath and uses Stream the app will break on boot
with this change the wrong class on the conditional on class gets fixed

fixes #100
2016-10-10 17:29:03 +02:00
Marcin Grzejszczak
37bc32ea76 Fixing the tests for Windows 2016-10-10 15:56:49 +02:00
Marcin Grzejszczak
f56eba4136 Fixing the tests for Windows 2016-10-10 14:52:14 +02:00
Marcin Grzejszczak
118dd8e04f Fixing the tests for Windows 2016-10-10 14:09:02 +02:00
Marcin Grzejszczak
fa152252b9 Fixing the tests for Windows 2016-10-10 13:47:05 +02:00
Marcin Grzejszczak
d3896f913b Changed ContractVerifierObjectMapper to a bean
without this change we couldn't alter the mapper

with this change you can customize the whole verifier objectmapper or the objectmapper that is on classpath

fixes #97
2016-10-07 14:59:49 +02:00
Marcin Grzejszczak
1e3c67e163 Added missing deps for runner
fixes #88
2016-10-04 16:27:15 +02:00
Marcin Grzejszczak
8e68dcedd4 Problem with auto-generated values from regex inside the respose body
added missing `$()` method for consumer and producer side only

fixes #94
2016-10-04 15:12:55 +02:00
Mariusz Smykuła
09cf63a600 stubs mappings directory should be the same for convert and run mojo (#95) 2016-09-30 07:55:35 +02:00
Mariusz Smykuła
61ca5a489c Fix for #87: 3.2.5 is minimum version of Maven required to use the plugin (#91) 2016-09-28 21:17:43 +02:00
Mariusz Smykuła
e5c3d57bdf stubs mappings directory should be the same for convert and run mojo. (#89) 2016-09-27 22:19:14 +02:00
Marcin Grzejszczak
e8031c0a65 Small updates of docs 2016-09-26 14:34:36 +02:00
Marcin Grzejszczak
b598518281 Added ignored to contracts
without this change the only way to ignore a contract was to provide it in the plugin's config

with this change you can also set it on the contract itself.

fixes #30
2016-09-26 14:32:01 +02:00
Marcin Grzejszczak
a557b89a86 Fixed missing test side value resolution
without this change when generating contract tests we were not iterating over a parsed json with test side values only. We had DslProperties that were ignored by multiple dispatch

with this change when generating tests we first convert the parsed json into its test side (those with `producer` method) and only then perform any logic

fixes #85
2016-09-26 13:21:06 +02:00
Marcin Grzejszczak
0694d5b6f6 Updated docs 2016-09-23 22:44:01 +02:00
Marcin Grzejszczak
6381362ad6 Going back to Snapshots 2016-09-23 21:04:10 +02:00
Marcin Grzejszczak
8ee2ef4b18 Bumping versions before release 2016-09-23 20:07:58 +02:00
Marcin Grzejszczak
c37873f2b8 Added option to sign archives for Gradle 2016-09-23 19:44:00 +02:00
Marcin Grzejszczak
3f6a1601ab Updated docs 2016-09-23 16:02:27 +02:00
Marcin Grzejszczak
a3e67a1b34 Updated docs 2016-09-23 15:59:55 +02:00
Marcin Grzejszczak
186ac4762f Updated docs 2016-09-23 15:56:11 +02:00
Marcin Grzejszczak
e8917940ec Added option of multiple test base classes
without this change the user was forced to use a single base class for all of the generated tests. It could become problematic after some time.

With this change we provide a range of options of providing different base classes for different contracts.

fixes #16
2016-09-23 15:52:14 +02:00
Marcin Grzejszczak
82a3da2b37 Updated docs 2016-09-23 11:14:02 +02:00
Marcin Grzejszczak
e3d9ec2d28 Updated pom 2016-09-23 11:12:37 +02:00
Marcin Grzejszczak
f079b8e440 Updated docs 2016-09-23 10:56:52 +02:00
Marcin Grzejszczak
71cfdfe9cc Updated docs 2016-09-23 10:44:50 +02:00
Marcin Grzejszczak
429cab76cc Updated docs 2016-09-23 10:43:27 +02:00
Marcin Grzejszczak
788b35aedb Stubbing service discovery out completely
without this change if you have a DiscoveryClient bean it's used for delegation. For tests with Stub Runner actually we don't want to delegate. There is an option however to turn on this delegation

fixes #82
2016-09-23 10:41:02 +02:00
Marcin Grzejszczak
01f4ad76be Consumer Contracts (#83)
With this functionality you can have one centralized repository containing all contracts. This repo will have to produce a JAR containing all contracts. The layout of the repository can be arbitrary but some sensible defaults are assumed. The producer will be able to then download that JAR and produce tests and stubs from it.

fixes #38
2016-09-23 10:16:51 +02:00
Marcin Grzejszczak
93782cb049 Polish 2016-09-21 11:06:16 +02:00
Marcin Grzejszczak
8bca6f22e6 Removed the CloudFoundry AutoConfig 2016-09-20 16:19:50 +02:00
Marcin Grzejszczak
cadaf079d6 Ignoring tests instead of removing them 2016-09-20 14:57:00 +02:00
Dave Syer
b81ff557bf Ensure version is scraped from parent pom 2016-09-20 13:48:13 +01:00
Marcin Grzejszczak
0d9a7b54ca Updated docs 2016-09-20 12:39:04 +02:00
Marcin Grzejszczak
b9eee2b2a7 Added docs about async
fixes #80
2016-09-20 12:33:55 +02:00
Marcin Grzejszczak
4528b6827f Removed some Gradle tests 2016-09-20 12:27:57 +02:00
Marcin Grzejszczak
7eefac9a15 Added missing conditional on class for Stream autoconfig 2016-09-20 09:25:24 +02:00
Marcin Grzejszczak
f09b96a524 Added missing delegates to AST to Contract 2016-09-20 08:35:21 +02:00
Marcin Grzejszczak
8bb5ce7297 Added AutoConfiguration available for Cloud profile that stubs out service discovery
will work only if the library is available at runtime (which shouldn't take place apart from testing environments)
2016-09-19 19:42:10 +02:00
Marcin Grzejszczak
55fc03d9d9 Added fast profile to skip Gradle tests 2016-09-19 19:42:10 +02:00
Marcin Grzejszczak
ad3fcb4bb7 Updating mvnw for all projects 2016-09-19 19:31:07 +02:00
Marcin Grzejszczak
09f982209e Updating mvnw for all projects 2016-09-19 14:18:02 +02:00
Dave Syer
06c9db932e Rationalize dependency management in BOMs 2016-09-19 12:02:25 +01:00
Dave Syer
1a9eccd5ef Move unnecessary dependencies up a level 2016-09-19 12:02:25 +01:00