Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xml support #855

Merged
merged 26 commits into from Jan 18, 2019
Merged

Add xml support #855

merged 26 commits into from Jan 18, 2019

Conversation

OlgaMaciaszek
Copy link
Collaborator

Fixes gh-322

# Conflicts:
#	spring-cloud-contract-spec/src/main/groovy/org/springframework/cloud/contract/spec/internal/BodyMatchers.groovy
#	spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/converter/YamlContractConverterSpec.groovy
from xml while generating stubs. Fix and adjust tests to recent changes.
# Conflicts:
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/builder/MethodBodyBuilder.groovy
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/converter/ContractsToYaml.groovy
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/dsl/wiremock/WireMockRequestStubStrategy.groovy
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/JsonToJsonPathsConverter.groovy
#	spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/converter/YamlContractConverterSpec.groovy
# Conflicts:
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/builder/MethodBodyBuilder.groovy
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/converter/ContractsToYaml.groovy
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/dsl/wiremock/WireMockRequestStubStrategy.groovy
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/JsonToJsonPathsConverter.groovy
#	spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/converter/YamlContractConverterSpec.groovy
…ons.

Move XML-assert lib content to project sources. Add tests.
}

List<BodyMatcher> jsonPathMatchers() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave this method, deprecate it and delegate to the new one

* @author Olga Maciaszek-Sharma
* @since 2.1.0
*/
trait ClassVerifier {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CompileStatic + a description of what it is used for?

* @param path - the xPath expression to retrieve the value with
* @return {@link String} value of the XML node
*/
public static String valueFromXPath(Document parsedXml, String path) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add @since to the public methods

@codecov-io
Copy link

codecov-io commented Jan 18, 2019

Codecov Report

Merging #855 into master will increase coverage by 1.6%.
The diff coverage is 76.95%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master     #855     +/-   ##
===========================================
+ Coverage     49.43%   51.04%   +1.6%     
- Complexity     2189     2316    +127     
===========================================
  Files           271      286     +15     
  Lines         10649    11134    +485     
  Branches       1723     1763     +40     
===========================================
+ Hits           5264     5683    +419     
- Misses         4542     4584     +42     
- Partials        843      867     +24
Impacted Files Coverage Δ Complexity Δ
...k/cloud/contract/spec/internal/MatchingType.groovy 66.66% <ø> (ø) 7 <0> (ø) ⬇️
...verifier/builder/imports/BaseImportProvider.groovy 87.5% <ø> (ø) 3 <0> (ø) ⬇️
...oud/contract/verifier/builder/MethodBuilder.groovy 66.03% <0%> (ø) 21 <0> (ø) ⬇️
...saging/stream/StubRunnerStreamMessageSelector.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...loud/contract/spec/internal/PathBodyMatcher.groovy 0% <0%> (ø) 0 <0> (?)
...d/contract/verifier/util/ContractVerifierUtil.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...egration/StubRunnerIntegrationMessageSelector.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...mework/cloud/contract/spec/internal/Headers.groovy 30% <0%> (-1.04%) 4 <0> (ø)
...nner/messaging/camel/StubRunnerCamelPredicate.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...contract/verifier/builder/JavaTestGenerator.groovy 74.02% <100%> (+0.69%) 17 <1> (+1) ⬆️
... and 49 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d8015a...c012ae7. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants